You're in the Library

RadioGroup

One choice among a few visible, mutually exclusive options. Arrow keys move the selection; the group has a legend and optional per-option descriptions.
Stable
Edit

Preview appears after the next Storybook update.

RadioGroup example
<RadioGroup />
Rendered with the real componentFrom the code
Light
Dark

When to use

Use it for

  • Two to about six exclusive options that benefit from being compared side by side.
  • Options that need a description to choose well.
  • horizontal only for two or three short options, like Light, Dark, System.

Not for

  • More than about six options, or options users know by name: use Select.
  • A single on or off: use Switch or Checkbox.
  • Switching views of content: use Tabs.

Do and don't

Every example is rendered with the real component, so it always matches what ships.

Theme
Do

Preselect the safest or most common option

A default saves a decision; pick the one most teams want.

Terms
Don't

A single radio button

One radio cannot be unselected. Use a Checkbox.

Accessibility

  • Base UI RadioGroup: role radiogroup named by the legend; one tab stop, arrow keys move and select.
  • Each radio is labelled by its text (aria-labelledby) and described by its description.
  • The group error is linked with aria-describedby and sets aria-invalid; it shows an icon and text.
  • Selected uses the ink fill with a light dot; the unselected edge is color.border.strong (3:1).

Content guidelines

  • Legend asks the question; options answer it in parallel form.
  • Keep option labels to a few words; move detail to the description.
  • Errors say what to do: "Pick a merge strategy before you publish."

From the code Generated from the component, not editable here.

Anatomy and tokens

Read from packages/react/src/components/RadioGroup/RadioGroup.module.css at build time. Every value is a token: open one to see its alias chain in both themes.

39 tokens23 semantic or component, change with theme and brand16 from the shared scales

Motion and interaction

RadioGroup animates on hover and check. Try it in the preview at the top.

PartWhenWhat changesDurationEasing
RadioGroupHoverBackground and bordermotion.duration.instant75 msmotion.easing.standardsettles in place
RadioHoverBorder and backgroundmotion.duration.instant75 msmotion.easing.standardsettles in place
RadioCheckBackground, border and movementmotion.duration.fast150 msmotion.easing.enterstarts fast, lands softly

With reduced motion turned on, every change happens at once.

From the code Generated from the component, not editable here.

Props

Parsed from the TypeScript types in packages/react/src/components/RadioGroup/RadioGroup.tsx, so this table cannot drift from the code.

PropTypeDefaultDescription
labelrequiredReactNodenoneGroup label, rendered as the fieldset legend. Ask the question the options answer.
childrenrequiredReactNodenoneRadio items.
descriptionReactNodenoneHelp under the legend.
errorReactNodenoneError message for the group. Marks it invalid and is linked with aria-describedby.
valuestringnoneNo description in the code yet.
defaultValuestringnoneNo description in the code yet.
onValueChange(value: string) => voidnoneNo description in the code yet.
orientation'vertical' | 'horizontal''vertical'Default `vertical`. Use `horizontal` only for two or three short options.
namestringnoneNo description in the code yet.
disabledbooleannoneNo description in the code yet.
readOnlybooleannoneNo description in the code yet.
requiredbooleannoneNo description in the code yet.
hideLabelbooleanfalseVisually hide the legend (it stays the accessible name).
classNamestringnoneNo description in the code yet.

Playground

Change the props and see the real RadioGroup update. Controls are generated from the TypeScript props; nothing here changes the system.

Code for these props
<RadioGroup defaultValue="squash" label="Merge strategy" />

orientation

Workbench

For contributors: every state with the accessibility panel, in the component workbench (Storybook). The stories double as visual test fixtures; the guidance on this page is the user documentation (open RadioGroup in Storybook).

Embed Storybook stories here (4)

Loads from https://bridge-storybook.floriangouloubi.com (set STORYBOOK_URL at build time). If Storybook is not running, the frames stay empty.

Default

Horizontal

Invalid

AllStates

From the code Generated from the component, not editable here.

Changelog

  • New

    SegmentedControl: pick one of two to five views or modes in a row of attached buttons (Base UI RadioGroup with native button radios)

    v1.0.0, Nov 11, 2026

All release notes