You're in the Library

CheckboxGroup

Several independent choices under one question, in a fieldset with a legend. An optional parent checkbox selects or clears the whole group and shows a mixed state.
Stable
Edit

Preview appears after the next Storybook update.

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

When to use

Use it for

  • Users may pick zero, one or several options from a short visible list (up to about seven).
  • Use allValues plus <Checkbox parent /> for a Select all at the top of a long list.

Not for

  • Only one option can be picked: use RadioGroup.
  • More than about seven options or a searchable list: use Combobox with multiple selection.

Do and don't

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

Notify me about
Do

Ask the question in the legend

The legend is read before each option, so it gives every label its context.

Don't

A group without a legend

Screen reader users hear "Light, checkbox" with no idea what it is for.

Accessibility

  • Native fieldset and legend: the legend names the group; disabled on the fieldset disables every item.
  • description and error are linked to the fieldset with aria-describedby; the error carries an icon and text.
  • The parent checkbox is checked, unchecked or mixed (aria-checked) based on the children, driven by Base UI.
  • Each item keeps its own label and description, so items can be reached and understood one by one.

Content guidelines

  • Legend as a short question or noun phrase: "Notify me about", "Platforms".
  • Options in a logical order (frequency, then alphabetical), parallel in grammar.
  • Errors say what to pick: "Pick at least one reviewer group."

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

Anatomy and tokens

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

19 tokens6 semantic or component, change with theme and brand13 from the shared scales

Motion and interaction

CheckboxGroup animates on hover. Try it in the preview at the top.

WhenWhat changesDurationEasing
HoverBackground and bordermotion.duration.instant75 msmotion.easing.standardsettles in place

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/CheckboxGroup/CheckboxGroup.tsx, so this table cannot drift from the code.

PropTypeDefaultDescription
labelrequiredReactNodenoneGroup label, rendered as the fieldset legend.
childrenrequiredReactNodenoneCheckbox items, each with a `value`.
descriptionReactNodenoneHelp under the legend.
errorReactNodenoneError for the group, for example "Pick at least one reviewer." Linked with aria-describedby.
valuestring[]noneValues of the checked items (controlled).
defaultValuestring[]noneNo description in the code yet.
onValueChange(value: string[]) => voidnoneNo description in the code yet.
allValuesstring[]noneEvery item value. Required for a parent "Select all" checkbox: add `<Checkbox parent label="All" />` and the group drives its checked and mixed state.
orientation'vertical' | 'horizontal''vertical'Default `vertical`.
disabledbooleannoneNo description in the code yet.
requiredbooleanfalseNo description in the code yet.
hideLabelbooleanfalseNo description in the code yet.
classNamestringnoneNo description in the code yet.

Playground

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

Code for these props
<CheckboxGroup label="Notify me about" />

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 CheckboxGroup 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

SelectAll

Invalid

AllStates

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

Changelog

No release note mentions CheckboxGroup yet.

All release notes