Radio
Radio buttons allow users to select exactly one choice from a group
Usage
Examples
Size
Use the size
prop to change the radio size.
Disabled
Disable all radio items by setting the disabled
prop to true on the Radio
component.
Disable individual radio items by setting the disabled
prop to true on the RadioItem
component:
Controlled Component
To use Radio
as a controlled component, set the value
and onValueChange
props.
Props
Radio
Radio
is abstracted from Radix UI's RadioGroup.Root
. Please refer to the API references in this documentation.
Prop | Type | Default |
---|---|---|
value | string | - |
onValueChange | function | - |
size | enum | medium |
disabled | boolean | false |
RadioButton
RadioButton
is abstracted from Radix UI's RadioGroup.Item
. Please refer to the API references in this documentation.
RadioItem
RadioHintText
uses the same props as a regular div
element.
Prop | Type | Default |
---|---|---|
disabled | boolean | false |
RadioHintText
RadioHintText
uses the same props as a regular label
element.
RadioLabel
RadioLabel
uses the same props as a regular label
element.