Checkbox

Installation

$npx shadcn-macos@latest add checkbox

Examples

Props

<Checkbox />
PropTypeDefaultDescription
checkedboolean—Controlled checked state.
defaultCheckedbooleanfalseInitial checked state when uncontrolled.
onCheckedChange(checked: boolean) => void—Callback fired when the checkbox state toggles.
labelReact.ReactNode—Label content displayed next to the checkbox box.
descriptionstring—Secondary helper text rendered beneath the main label.
disabledbooleanfalseWhether the checkbox is disabled.
classNamestring—Custom CSS classes.