Radio
Native radio buttons grouped for mutually exclusive choices, with an accessible fieldset/legend.
npx @slipstream-ui/cli@latest add radioStates
RadioCard — clickable sections (interactive)
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | Shared group name (RadioGroup). |
| value / defaultValue | string | — | Controlled or initial selection (RadioGroup). |
| onValueChange | (value: string) => void | — | Called with the newly selected value (RadioGroup). |
| legend | string | — | Accessible group label rendered as the fieldset legend. |
| orientation | 'vertical' | 'horizontal' | 'vertical' | Stack options or lay them out in a wrapping row (RadioGroup). |
| error | string | — | Group-level validation message; announced via role=alert (RadioGroup). |
| value | string | — | The value this item contributes to the group (RadioGroupItem). |
| label | string | — | Visible label rendered next to the radio (RadioGroupItem). |
| title | string | — | Section heading (RadioCard). |
| description | string | — | Supporting line under the title (RadioCard). |
| rounded | boolean | true | Outer border radius on the section; false gives square corners (RadioCard). |
| disabled | boolean | false | Disables an individual item. |
Accessibility
- RadioGroup renders a fieldset with a legend so the group name is announced.
- Native arrow-key navigation within the group; only the selected radio is tabbable.
- Disabled items are announced natively and skipped by arrow keys.
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.