Checkbox
A control that allows the user to toggle between checked and not checked.
Installation
uvx django_shadcn@latest add checkbox
Usage
<c-checkbox id="terms" />
Examples
With text
You agree to our Terms of Service and Privacy Policy.
<div class="items-top flex space-x-2">
<c-checkbox id="terms" />
<div class="grid gap-1.5 leading-none">
<label
for="terms"
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
>
Accept terms and conditions
</label>
<p class="text-sm text-muted-foreground">
You agree to our Terms of Service and Privacy Policy.
</p>
</div>
</div>
Disabled
<c-checkbox id="terms" disabled />