Radio Group
Radios provide users with different selection and activation tools.
install | yarn add @clayui/form |
---|---|
version | 3.119.0 |
Form.RadioGroup
Property | Description |
---|---|
children Array<
React.ReactElement<IRadioProps> | React.ReactElement<IToggleProps>
> | Takes either Radio or Toggle as a child. |
defaultValue React.ReactText | Property to set the default value (uncontrolled). |
inline boolean | Flag to indicate if radio elements should display inline. |
name string | Form element name that is applied to each radio element. |
onChange InternalDispatch<React.ReactText> | Callback function for whenever a radio element is selected (controlled). |
onSelectedValueChange DeprecatedInternalDispatch<React.ReactText> | Callback function for whenever a radio element is selected.
@deprecated since v3.51.0 - use onChange instead. |
selectedValue DeprecatedReact.ReactText | The value that corresponds to the selected radio element. Leave
undefined if no option is selected.
@deprecated since v3.51.0 - use value instead. |
value React.ReactText | The value property sets the current value (controlled). |
Form.Radio
Property | Description |
---|---|
containerProps React.HTMLAttributes<HTMLDivElement> | Props for the outer most container element. The default value is {className: ''} |
inline boolean | Flag to indicate if radio elements should display inline. |
label React.ReactText | Text to describe for radio element. |
value React.ReactText | Value provided if element is selected. |