Skip to content
SevenOne

Search documentation

Search pages and components

Checkbox

Lets people turn an option on or off. The box is 24px, and an invisible area around it makes the target 44px.

Installation

npx shadcn@latest add @sevenone/checkbox

Usage

import { Checkbox } from "@/components/ui/checkbox"

Examples

With label and description

You agree to our Terms of Service and Privacy Policy.

<div className="flex items-start gap-3.5">
  <Checkbox id="terms" defaultChecked aria-describedby="terms-desc" />
  <div className="grid gap-1.5">
    <Label htmlFor="terms">Accept terms and conditions</Label>
    <p id="terms-desc" className="text-sm text-muted-foreground">
      You agree to our Terms of Service and Privacy Policy.
    </p>
  </div>
</div>

Accessibility

  • The 44px hit area keeps the 24px box easy to tap.
  • Space toggles it; the label is clickable too.