Checkbox Group

Shared state for a series of checkboxes — one value array in, one out — including a select-all parent with an indeterminate middle state.

tsx
import { Checkbox } from "@/registry/seam/ui/checkbox"
import { CheckboxGroup } from "@/registry/seam/ui/checkbox-group"
import { Label } from "@/registry/seam/ui/label"

export default function CheckboxGroupDemo() {
  return (
    <CheckboxGroup defaultValue={["replies"]} aria-label="Notifications">
      <Label>
        <Checkbox name="replies" />
        Replies to my threads
      </Label>
      <Label>
        <Checkbox name="mentions" />
        Direct mentions
      </Label>
      <Label>
        <Checkbox name="digest" />
        Weekly digest
      </Label>
    </CheckboxGroup>
  )
}
bunx --bun @seamui/cli@latest add checkbox-group

API

PropTypeDefaultDescription
value / defaultValuestring[]Names of the ticked checkboxes (controlled / uncontrolled).
onValueChange(value, eventDetails) => voidFires with the new name array when any member toggles.
allValuesstring[]Every member name — required to wire a select-all parent.
disabledbooleanDisables the whole group.

Members are plain seam Checkboxes: give each a name, and mark the select-all one with parent.

Notes

  • Motion and haptics live on the member checkboxes — each mark pops with a spring and ticks on commit — so the group wrapper adds no feedback of its own (no double-buzz).
  • Inside a Field, wrap each row in FieldItem for per-option label wiring; standalone, the Label wrapper shown in the examples is enough.
  • The parent checkbox's indeterminate state is managed by Base UI from allValues vs the current value.

Press feedback, reduced motion, and haptics follow the global policy — see Motion and Haptics.