- Accordion
- Alert Dialog
- Avatar
- Badge
- Banner
- BreadcrumbSOON
- Button
- Button Group
- Calendar
- Callout
- Card
- Checkbox
- CodeblockSOON
- Color Picker
- Container
- Control Group
- Dialog
- Dropdown
- File Uploader
- FlexBox
- FormSOON
- Grid View
- IconSOON
- ImageSOON
- Input
- Link
- List
- MenuSOON
- PaginationSOON
- Popover
- Progress
- Radio
- Section
- Select
- Separator
- Skeleton
- SliderSOON
- SpinnerSOON
- Switch
- Table
- Tabs
- Tag
- Textarea
- ToastSOON
- Tooltip
Radio
With our Radio button, making choices is smooth sailing. One click, one choice, zero confusion!Example
API Reference
Component | Description |
---|---|
Radio | The exclusive club. A group of options where only one can be chosen at a time, ensuring users make a single, clear choice from a list. |
Radio.Item | The individual contender. A single option within the Radio group, vying for the user’s selection as the chosen one. |
Component Properties
Radio
Prop | Type | Default | Explanation |
---|---|---|---|
size | string | sm | The size of the entire Radio component (at the moment, does not affect the label font). |
color | string | default | The color variant of Radio Box and Indicator |
defaultValue | string | The default value of the Radio group. This tells which item is selected at render | |
value | string | Same as | |
onValueChange | function | - | Callback function that is called when value changes. Returns the new value |
label | string | - | Text to be used as Label alongside the Radio box |
orientation | string | horizontal | Orientation of the Radio items (vertical or horizontal) |
Radio.Item
Prop | Type | Default | Explanation |
---|---|---|---|
id | string | - | The unique identifier. A string that gives your Radio.Item a distinct identity. |
value | string | - | The underlying data piece that gets transmitted when the Radio.Item is selected, representing its true value. |
disabled | boolean | false | When true, prevents interaction with the Radio.Item, rendering it untouchable in the UI. |
required | boolean | false | When true, mandates the selection of a Radio.Item in the group before the user can proceed. |