Forms/Radio
Radio
Accessible radio group for selecting a single option from a list. Supports descriptions, disabled states, and keyboard navigation.
import { RadioGroup, RadioItem } from "@animui/ui"Basic
With descriptions
RadioGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The currently selected value. |
onChange | (value: string) => void | — | Called when selection changes. |
name | string | — | HTML name attribute — groups radio inputs for form submission. |
disabled | boolean | false | Disables the entire group. |
RadioItem Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The value this item represents. |
label | string | — | Visible label text. |
description | string | — | Secondary descriptive text below the label. |
disabled | boolean | false | Disables this individual item. |
Accessibility
- ✓Native
<input type="radio">elements under the hood — works with form submission. - ✓Arrow keys navigate between options within the group.
- ✓Descriptions are associated via
aria-describedby.