Checkbox

Base UI checkbox with a filled primary checked state, check icon indicator and an enlarged invisible hit area. Includes focus ring, disabled and invalid styling and works inside Field labels.

Open the preview in a new tab
"use client"

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

/** Checkbox, checked, with its Label. */
export default function CheckboxDemo() {
  return (
    <div className="flex items-center gap-3">
      <Checkbox id="updates" defaultChecked />
      <Label htmlFor="updates">Email me when new blocks ship</Label>
    </div>
  )
}

Installation

pnpm dlx shadcn add @01orbital/checkbox
npx shadcn add @01orbital/checkbox
yarn shadcn add @01orbital/checkbox
bunx --bun shadcn add @01orbital/checkbox

Add the @01orbital registry to components.json once (install guide), then run the command.

It lands at components/ui/checkbox.tsx, as source you own and edit.

Dependencies

npm: @base-ui/react, @phosphor-icons/react, cn. The CLI installs them for you.

No other registry pieces.

On this page