Checkbox
An animated, accessible, and controllable checkbox component.
Install
pnpm dlx shadcn@latest add https://www.katestroyui.com/r/checkbox
Usage
1import { Checkbox } from "@/components/ui/checkbox";23export function Example() {4 return (5 <div className="bg-background border rounded-lg p-6 shadow flex flex-col gap-6 mb-6 items-center justify-center">6 <Checkbox />7 </div>8 );9}
Props
Prop | Type | Description | Default |
---|---|---|---|
checked | boolean | Whether the checkbox is checked | false |
onCheckedChange | (checked: boolean) => void | Callback when checked state changes | - |
className | string | Extra CSS classes | - |