Checkbox Group
Provides shared state to a series of checkboxes.
Loading...
Loading code...
Installation
Usage
import { Checkbox } from "@/components/ui/checkbox"
import { CheckboxGroup } from "@/components/ui/checkbox-group"<CheckboxGroup>
<Label>
<Checkbox defaultChecked />
Next.js
</Label>
<Label>
<Checkbox />
Vite
</Label>
<Label>
<Checkbox />
Astro
</Label>
</CheckboxGroup>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
Loading...
Loading code...
Parent Checkbox
Loading...
Loading code...
Nested Parent Checkbox
Loading...
Loading code...
Form Integration
Loading...
Loading code...