Radio Group
Choose exactly one of a few visible options.
Session
Usage
import { RadioGroup } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Two to five options that replace each other.
When not to use
- More than five options. Use Select.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | required | Title of the group. |
items | { value, label, isDisabled? }[] | required | |
value, defaultValue, onChange | string, string, (v) => void | - | |
size | 'md' | 'lg' | 'md' |
Accessibility
- Arrow keys move between options; Tab leaves the group.