Skip to main content

Checkbox

A native-backed checkbox with a styled box; supports indeterminate.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
isSelectedboolean—Controlled checked state.
defaultSelectedboolean—
isIndeterminateboolean—
isDisabledboolean—
onChange(isSelected: boolean, e: React.ChangeEvent) =&gt; void—
descriptionReact.ReactNode—A secondary line under the label (what the option means); linked via aria-describedby, as Radio's is.
childrenReact.ReactNode—
classNamestring—