--- title: Checkbox Group description: Provides shared state to a series of checkboxes. links: doc: https://base-ui.com/react/components/checkbox-group#api-reference --- ## Installation CLI Manual ```bash npx shadcn@latest add @coss/checkbox-group ``` Install the following dependencies: ```bash npm install @base-ui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx import { Checkbox } from "@/components/ui/checkbox" import { CheckboxGroup } from "@/components/ui/checkbox-group" ``` ```tsx ``` ## API Reference ### CheckboxGroup Styled wrapper for `CheckboxGroup` from Base UI. Provides shared state management for a group of checkboxes with flex column layout. ## Examples For accessible group labelling and validation, prefer wrapping checkbox groups with `Field` and `Fieldset`. See the related example: [Checkbox group field](/ui/docs/components/field#checkbox-group-field). ### With Disabled Item ### Parent Checkbox ### Nested Parent Checkbox ### Form Integration