Radio
Radio is the single control; RadioGroup manages a set and calls onChange with the chosen value.
Props
Radio
labelReactNodeLabel text.
disabledbooleanDefault:falseDisable the control.
classNamestringDefault:''Extra classes for the root element.
...input propsname, value, checked, onChange and the rest go to the <input>.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | – | Label text. |
disabled | boolean | false | Disable the control. |
className | string | '' | Extra classes for the root element. |
...input props | – | name, value, checked, onChange and the rest go to the <input>. |
RadioGroup
labelstringGroup legend.
namestringShared input name (generated if omitted).
valuestringSelected value.
onChange(value: string) => voidCalled with the chosen value.
options{ value, label, disabled? }[]Radios to render.
direction'column' | 'row'Default:'column'Layout of the radios.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | – | Group legend. |
name | string | – | Shared input name (generated if omitted). |
value | string | – | Selected value. |
onChange | (value: string) => void | – | Called with the chosen value. |
options | { value, label, disabled? }[] | – | Radios to render. |
direction | 'column' | 'row' | 'column' | Layout of the radios. |