ui

Checkbox Group

Provides shared state to a series of checkboxes. Built with Base UI and Tailwind CSS. Copy-paste ready.

API Reference

Installation

Usage

Examples

For accessible group labelling and validation, prefer wrapping checkbox groups with Field and Fieldset. See the related example: Checkbox group field.

With Disabled Item

Demonstrates how to disable a single option within a group while leaving the others interactive.

Parent Checkbox

A "select all" parent checkbox whose state reflects the group — unchecked, checked, or indeterminate depending on child selections.

Nested Parent Checkbox

Multi-level parent/child checkboxes where each parent controls a subset, and a root parent controls all subsets.

Form Integration

Wraps the checkbox group in Field and Form for built-in validation and required-state support.

Two-Level Tech Stack Picker

Two CheckboxGroup parent checkboxes (Frontend, Backend) each controlling a subset of items, inside a shared outer group that handles the select-all root.

Recurring Schedule

A day-of-week selector with separate parent checkboxes for Weekdays and Weekend, and a day count badge that reflects the current selection.

Integration Enablement

Integration options rendered as card rows with an "Enable all" parent checkbox at the top, and a Save button showing the active count.

Data Export Selector

Two section groups (Content, Settings) with nested items under each parent checkbox, plus an item count summary line below the list.

Food Preferences

Two independent CheckboxGroup instances — one for cuisines and one for dietary options — each with a select-all parent and a two-column item grid.