Files
basecoat/docs/_includes/checkbox.njk
T
2025-04-18 12:58:28 +08:00

31 lines
1.7 KiB
Plaintext

<section id="checkbox" class="w-full rounded-lg border">
<header class="border-b px-4 py-3">
<h2 class="text-sm font-medium">Checkbox</h2>
</header>
<div class="p-4">
<div class="flex flex-col gap-6">
<label class="label gap-3">
<input type="checkbox" class="input">
Accept terms and conditions
</label>
<div class="flex items-start gap-3">
<input type="checkbox" id="checkbox-demo-label-and-description" class="input">
<div class="grid gap-2">
<label for="checkbox-demo-label-and-description" class="label">Accept terms and conditions</label>
<p class="text-muted-foreground text-sm">By clicking this checkbox, you agree to the terms and conditions.</p>
</div>
</div>
<label class="label gap-3">
<input type="checkbox" class="input" disabled>
Enable notifications
</label>
<label class="flex items-start gap-3 border p-3 hover:bg-accent/50 rounded-lg has-[input[type='checkbox']:checked]:border-blue-600 has-[input[type='checkbox']:checked]:bg-blue-50 dark:has-[input[type='checkbox']:checked]:border-blue-900 dark:has-[input[type='checkbox']:checked]:bg-blue-950">
<input type="checkbox" id="checkbox-demo-label-and-description" class="input checked:bg-blue-600 checked:border-blue-600 dark:checked:bg-blue-700 dark:checked:border-blue-700 checked:after:bg-white" checked>
<div class="grid gap-2">
<h2 class="text-sm leading-none font-medium">Accept terms and conditions</h2>
<p class="text-muted-foreground text-sm">By clicking this checkbox, you agree to the terms and conditions.</p>
</div>
</label>
</div>
</div>
</section>