Radio
Radio is a native <input type="radio"> with a styled circle, wrapped in a <label>. Radios that share a name
form one group, and the browser keeps only one of them checked.Forms
When to use
Use when
- The user picks exactly one of a few options (up to about five) that fit on screen.
- Every option should stay visible while choosing.
Avoid when
- Several options can be on at once — use
Checkbox. - The list is long — use
SelectorInputSelect. - You render the group from data — use
FieldGroup.
Usage
<Radio id="plan-basic" name="plan" value="basic" label="Basic" checked={plan === 'basic'} onChange={onPlan} />
<Radio id="plan-pro" name="plan" value="pro" label="Pro" checked={plan === 'pro'} onChange={onPlan} />
<Radio id="plan-team" name="plan" value="team" label="Team (unavailable)" disabled />Color and states
The checked fill uses color (default primary); a validation variant (success, error) wins over it.
<Radio id="fav" name="filter" value="fav" label="Only favorites" color="information" /> <Radio id="err" name="plan" value="basic" label="Basic" variant="error" />
Label
A string label renders as small text in ink.primary; labelProps overrides its typography. A ReactNode
label renders as-is and ignores labelProps.
Accessibility
Tabfocuses the group; the arrow keys move the selection between radios with the samename.- Keyboard focus draws a
:focus-visibleoutline on the circle, kept in forced-colors mode. - Name the group: wrap the radios in a
<fieldset>with a<legend>.
Properties
Name
Type
Default
Description
color"primary""secondary""tertiary""information""success""warning""danger"'primary'Interaction palette of the checked state (fill / ring / ink). Defaults
to the brand `primary`, like `Button` and `Tabs`. `variant` (`success` /
`error`) still wins when set.
labelReactNodenoneText or element displayed next to the radio button. When `string`, it
is rendered via `BaseText`; when `ReactNode`, it is rendered as-is.
labelPropsPartial<TextInterface>noneTypography overrides for a string `label` (`fontSize`, `color`, …).
Ignored when `label` is a `ReactNode`.
@example ```tsx
<Radio id="r" name="plan" value="x" label="Accept" labelProps={{ fontSize: 'micro', color: 'ink.secondary' }} />
```
onChange((e: ChangeEvent<HTMLInputElement, Element>) => void)nonevaluestringnonevariant"success""default""error"'default'Visual variant of the input — reflects the validation state.
Placement props (area, alignSelf, justifySelf) apply to the label wrapper.