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";
2
3export 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

PropTypeDescriptionDefault
checkedbooleanWhether the checkbox is checkedfalse
onCheckedChange(checked: boolean) => voidCallback when checked state changes-
classNamestringExtra CSS classes-