Checkbox Group

A labelled set of checkboxes that share one value, the list of checked options, with an optional Select All.
Stable
Web
iOS
Android
@advui/core
Source

Labels and descriptions

Kept for 30 days.
Page views, without cookies.
On the Team plan.

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { CheckboxGroup, Field } from '@advui/core'

<Field label="Notifications">
  <CheckboxGroup value={channels} onValueChange={setChannels}>
    <CheckboxGroup.SelectAll label="All channels" />
    <CheckboxGroup.Item value="email" label="Email" />
    <CheckboxGroup.Item value="sms" label="SMS" description="Standard rates apply." />
  </CheckboxGroup>
</Field>

Examples

Select All

Checks or clears every item, and shows a mixed state while only some are checked.
1 of 3 selected

In a Field

The field names the group and shows its error; the items sit in a row that wraps.
We deliver between 9 am and 5 pm.Pick at least one day.

API reference

CheckboxGroup

A View with `role="group"`. Lay items out freely inside it (in a nested stack, beside other content); they find the group through context.
PropTypeDefaultDescription
valuestring[]—The checked items’ values, when you control it.
defaultValuestring[][]Starting `value` when uncontrolled.
onValueChange(value: string[]) => void—Called with the new list when an item or Select All is toggled. A checked item is added at the end.
orientation'vertical' | 'horizontal''vertical'`horizontal` puts the items in a row that wraps.
size'sm' | 'md''md'Checkbox size for every item: 16 or 20px.
gapSpaceTokens'3'; horizontal: '5' between items, '3' between rowsSpace between items, and between rows when a horizontal group wraps.
disabledbooleanfalseDisables every item. Also on inside a disabled Field or Form.
invalidbooleanfalseError border and `aria-invalid` on every item. On inside a Field with an `error`.
namestring—Field name for a native form: each checked item submits its `value` under it.Web only.
aria-labelstring—Names the group. Inside a Field, the field’s label names it instead.

CheckboxGroup.Item

A Checkbox; other Checkbox props (`id`, `aria-label`, style props) go to it.
PropTypeDefaultDescription
value requiredstring—Added to the group’s value while checked.
labelReactNode—Text beside the checkbox; pressing it toggles the checkbox. Without one, give the item an `aria-label` or your own `Label htmlFor`.
descriptionReactNode—Smaller text under the label, linked as the checkbox’s description.
size'sm' | 'md'the group’s16 or 20px.
disabledbooleanfalseDisables this item. Select All leaves it as it is.

CheckboxGroup.SelectAll

A Checkbox that is checked when every item is, mixed when some are. It is not part of the value.
PropTypeDefaultDescription
labelReactNode—Text beside the checkbox.
descriptionReactNode—Smaller text under the label.
size'sm' | 'md'the group’s16 or 20px.
disabledbooleanfalseDisables it. It is also disabled when every item is.

Accessibility

  • role="group", named by aria-label or, inside a Field, by the field’s label (aria-labelledby). The field’s help and error text describe the group.
  • Each item is a checkbox named by its label, with its description linked through aria-describedby. Pressing the label toggles it.
  • Select All is aria-checked="mixed" while only some items are checked, and lists the items in aria-controls.
  • Every checkbox stays a Tab stop, as in the WAI-ARIA checkbox pattern. Space toggles the focused one.
  • A Field’s required adds the marker to its label, but a group has no required state for screen readers: say what is required in the help or error text.
Keyboard interactions
KeyAction
TabMoves to the next checkbox.
SpaceToggles the focused checkbox.

Platform notes

Web
A div with role="group"; each checked item has a hidden <input type="checkbox"> for form submission.
iOS
VoiceOver has no group names, so each item reads the group’s name and help text as its hint, after its own description. The visible label and description are hidden from VoiceOver, since the checkbox already reads them.
Android
TalkBack has no group names, so each item reads the group’s name and help text as its hint, after its own description. The visible label and description are hidden from TalkBack, since the checkbox already reads them.
Since v0.14.0Last updated Nov 2, 2026Edit this page on GitHub