Groups multiple checkboxes together with shared state management. Each item has a Trigger, Indicator, and Label.

import CheckboxGroup from "@radui/ui/CheckboxGroup"
Example
React
"use client" import { useState } from "react" import CheckboxGroup from "@radui/ui/CheckboxGroup" const options = [ { id: 'notifications', value: 'notifications', label: 'Email notifications' }, { id: 'marketing', value: 'marketing', label: 'Marketing emails' }, { id: 'security', value: 'security', label: 'Security alerts' } ] const CheckboxGroupExample = () => { const [checked, setChecked] = useState(['notifications', 'security']) return ( <CheckboxGroup.Root name="preferences" value={checked} onValueChange={setChecked} > {options.map((option) => ( <CheckboxGroup.Label key={option.id}> <CheckboxGroup.Trigger value={option.value}> <CheckboxGroup.Indicator /> </CheckboxGroup.Trigger> {option.label} </CheckboxGroup.Label> ))} </CheckboxGroup.Root> ) } export default CheckboxGroupExample
  • One value array for the whole group, controlled or uncontrolled
  • A parent checkbox with allValues checks or clears every item and shows the mixed state
  • Arrow keys move between items in either orientation; Space toggles
  • Every item is a native checkbox under the group's name, so the form receives each checked value

Import all parts of the component and piece them together.

React
import CheckboxGroup from "@radui/ui/CheckboxGroup" export default () => { return ( <CheckboxGroup.Root> <CheckboxGroup.Label> <CheckboxGroup.Trigger value="option"> <CheckboxGroup.Indicator /> </CheckboxGroup.Trigger> Label </CheckboxGroup.Label> </CheckboxGroup.Root> ) }

The root CheckboxGroup component.

PropTypeDefault
value
string[][]
defaultValue
string[][]
onValueChange
function—
allValues
string[]—

One checkbox in the group. With parent, it's the "select all" checkbox: checked when every item is, mixed (aria-checked="mixed", data-state="indeterminate") when some are.

PropTypeDefault
value
string—
parent
booleanfalse
disabled
booleanfalse
onCheckedChange
(checked: boolean) => void—
ShortcutDescription
Tab

Moves focus into or out of the checkbox group.

ArrowRight

Moves focus to the next enabled checkbox item when the group orientation allows horizontal navigation.

ArrowDown

Moves focus to the next enabled checkbox item when the group orientation allows vertical navigation.

ArrowLeft

Moves focus to the previous enabled checkbox item when the group orientation allows horizontal navigation.

ArrowUp

Moves focus to the previous enabled checkbox item when the group orientation allows vertical navigation.

Home

Moves focus to the first enabled checkbox item.

End

Moves focus to the last enabled checkbox item.

Space

Toggles the focused checkbox item between checked and unchecked states.

ReferenceWhat Rad UI follows
Checkbox pattern

Each item uses checkbox semantics with aria-checked, aria-required, and aria-disabled state exposed on the focusable trigger.