Checkbox
A control that allows the user to toggle between checked and not checked.
Installation
pnpm dlx shadcn@latest add https://8bit.cnlibs.com/r/checkbox.jsonUsage
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";<div className="flex items-center gap-2">
<Checkbox defaultChecked id="terms" />
<Label htmlFor="terms">Accept terms and conditions</Label>
</div>Disabled
Set disabled to prevent the checkbox from being toggled.