Checkbox

A control that toggles between checked and unchecked.

The Checkbox lets users toggle a boolean option. Built on Radix UI, it supports keyboard interaction and form integration.

Preview

Usage

Installation

$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/checkbox.json

Properties

PropTypeDefaultDescription
checkedboolean | "indeterminate"Controlled checked state.
onCheckedChange(checked: boolean) => voidCalled when the checked state changes.
disabledbooleanfalseDisables the checkbox.
classNamestringAdditional CSS classes.