Checkbox
A native-backed checkbox with a styled box; supports indeterminate.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A native-backed checkbox with a styled box; supports indeterminate.
Accessibility
Always render a visible <label> (the label prop wires htmlFor/id for you). Errors set aria-invalid and are announced via aria-describedby. Required fields expose aria-required.
Install and import
npx shadcn@latest add @prism/checkbox
import { Checkbox } from '@/components/prism/Checkbox';
In a no-build prototype, read it from the bundle instead: const { Checkbox } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
isSelected | boolean | — | Controlled checked state. |
defaultSelected | boolean | — | |
isIndeterminate | boolean | — | |
isDisabled | boolean | — | |
onChange | (isSelected: boolean, e: React.ChangeEvent) => void | — | |
description | React.ReactNode | — | A secondary line under the label (what the option means); linked via aria-describedby, as Radio's is. |
children | React.ReactNode | — | |
className | string | — |