Radio
A group of mutually exclusive options.
Staticimport { RadioGroup } from 'umbra-ui'
Props
RadioGroup
| Prop | Type | Default | Description |
|---|---|---|---|
invalid | boolean | — | Marks the group as invalid (sets `aria-invalid`). Inherited from FormField when omitted. |
orientation | "vertical" | "horizontal" | vertical | Layout direction; also decides which arrow keys move the selection. |
Radio
| Prop | Type | Default | Description |
|---|---|---|---|
value required | string | — | Value selected when this option is chosen. |
children | ReactNode | — | Inline label. When present the root element is a `<label>` that receives `className`; other props go to the control. |
Usage notes
RadioGroup holds the value; each Radio is one option.
Accessibility
role="radiogroup"with roving tabindex: Tab enters once, arrow keys move and select, disabled options are skipped.- Name the group with
aria-label, or put it in aFormFieldand it is labelled automatically.
Import
import { RadioGroup, Radio } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app