Search

Search components and blocks

Sign in

Checkbox

The shadcn Checkbox with a spring pop between checked, unchecked, and indeterminate states via Motion.

pnpm dlx shadcn@latest add @ditherui/checkbox

Install

$ pnpm dlx shadcn@latest add @ditherui/checkbox

Props

checkedboolean | "indeterminate"—
defaultCheckedboolean | "indeterminate"false
onCheckedChange(checked: boolean | "indeterminate") => void—
disabledbooleanfalse

When to use the checkbox

Use the checkbox for on or off choices and lists of options. It is the shadcn Checkbox with a spring pop between checked, unchecked and indeterminate.

  • Open the CLI tab on any preview above for the exact shadcn command. The source is copied into your project, so you can edit it like any other file.

Suggested components