Browse the docs
Inputs / RadioGroup

RadioGroup

Radios fill with an ink blob. A fieldset of real radio inputs.

Client componentWCAG AASince v0.1
Priority

Change every prop live in the playground.

Props

RadioGroup

PropTypeDefaultWhat it does
children requiredReactNode——
legend requiredReactNode—The question, shown as the fieldset's legend.
classNamestringnone—
defaultValuestringnone—
disabledbooleanfalse—
namestringa generated oneForm field name.
onValueChange(value: string) => voidnone—
valuestringnone—
verticalbooleantrueStack options vertically.

Radio

PropTypeDefaultWhat it does
children requiredReactNode——
value requiredstring——
disabledbooleanfalse—
dotColorstringinkColor of the ink blob, as a CSS color or token variable.

Use it well

DoUse it for 2 to 5 choices people should see all at once.
Don'tLeave a group with nothing selected when one answer is the sensible default.

Accessibility

  • A <fieldset> and <legend> holding native radios.
  • Arrow keys move between options, as with any radio group.
Five stamps!

All aboard.

You took the whole tour. Here's Holo Pip, a foil sticker for riders who finish. It's in your playground tray now, for good.