Forms
Radio
One choice from a short list, as rows or as cards.
Ant Design: Radio
import { RadioGroup, Radio } from '@alea/ui';
Examples
Radio group
One choice; arrows move and select.
Contrast standard
Cards
Each option as a tile, for plans and modes.
Plan
Horizontal
For two or three short options.
Theme
Props
RadioGroup props
One choice from a short list; arrow keys move between options.
| Prop | Type | Default | Description |
|---|---|---|---|
appearance | "default" | "cards" | 'default' | cards: each option as a bordered tile (good for plans or modes). |
description | ReactNode | - | Help text under the group. |
errorMessage | ReactNode | ((v: ValidationResult) => ReactNode) | - | Error text, shown when the group is invalid. |
label | ReactNode | - | The visible label for the group. |
orientation | "horizontal" | "vertical" | 'vertical' | vertical (default) or horizontal. |
Radio props
One option of a RadioGroup.
| Prop | Type | Default | Description |
|---|---|---|---|
description | ReactNode | - | Help text under the option label. |
Accessibility
- Arrow keys move and select within the group; Tab leaves it.
Keyboard
| Key | Does |
|---|---|
| Tab | Moves to the selected option |
| Arrow keys | Move and select |
Do and don't
Do
- Pre-select the most common choice when it is safe.
Don't
- Don't use for more than seven options: use Select.