Skip to the content

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

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

  • Tab focuses the group; the arrow keys move the selection between radios with the same name.
  • Keyboard focus draws a :focus-visible outline on the circle, kept in forced-colors mode.
  • Name the group: wrap the radios in a <fieldset> with a <legend>.

Properties

Placement props (area, alignSelf, justifySelf) apply to the label wrapper.

See also