Components
Radio
A radio button component for selecting one option from a set.
Demo
Code
Option One
Option Two
Installation
Usage
Radio (Standalone)
RadioGroup
Sizes
Orientation
With Description
Disabled State
API Reference
Radio
Standalone radio button.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Whether checked |
onCheckedChange | (checked: boolean) => void | — | Change callback |
size | 'sm' | 'md' | 'lg' | 'md' | Radio size |
disabled | boolean | false | Disable the radio |
value | string | — | Value identifier |
children | ReactNode | — | Label content |
className | string | — | Additional classes |
RadioGroup
Group container for radio items.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Selected value |
onValueChange | (value: string) => void | — | Change callback |
orientation | 'vertical' | 'horizontal' | 'vertical' | Layout direction |
size | 'sm' | 'md' | 'lg' | 'md' | Size for all items |
disabled | boolean | false | Disable all items |
children | ReactNode | Required | RadioGroupItem children |
className | string | — | Additional classes |
RadioGroupItem
Individual radio option.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Required | Option value |
disabled | boolean | false | Disable this item |
children | ReactNode | — | Label content |
className | string | — | Additional classes |
RadioGroupLabel
Label text for a radio item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Label text |
className | string | — | Additional classes |
RadioGroupDescription
Description text for a radio item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Description text |
className | string | — | Additional classes |