RadioList
Install
yarn add @ntds/radio
Import
import { RadioList } from '@ntds/radio';
Props
RadioList
Prop | Type & Description |
---|---|
name | string The name for the list of radios. This prop will be propagated to each radio element |
value | string The value of the checked radio |
horizontal | boolean If the RadioList should be displayed horizontally |
labelPosition | "right" | "bottom" Default value: "right" Position of label |
errorMessage | string | ((id: string) => ReactNode) Mark the input as invalid both visually and semantically Given as a |
hasError | boolean Toggle an errormessage below the RadioList |
onChange | (value: string) => void A callback that gets triggered when a radio is clicked |
children | ReactNode Usually simple text, but can be anything |