Components
Radio
Single-choice selection using RadioGroup for grouped options or standalone Radio for custom layouts.
Import
RadioGroup usage
RadioGroup is the preferred way to render mutually exclusive options:
RadioGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | Input name for the radio group |
label | string | — | Fieldset legend |
value | string | — | Currently selected value |
onChange | (value: string) => void | — | Called with the new value |
options | RadioOption[] | — | Array of options |
className | string | — | Additional CSS classes |
RadioOption type
Standalone Radio usage
For custom layouts where you manage the group yourself:
Radio Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Visible label |
description | string | — | Secondary text |
...rest | InputHTMLAttributes | — | All native input attributes (name, value, checked, disabled, etc.) |
Accessibility
RadioGrouprenders a<fieldset>with<legend>— correct semantic structure- Arrow keys move between options in the group
- Disabled options cannot be selected (neither by click nor keyboard)
aria-describedbylinks description text