{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "description": "Accessible checkbox with checked, unchecked and indeterminate states.",
  "dependencies": [
    "@base-ui/react@^1.8.0",
    "lucide-react@^1.48.0"
  ],
  "files": [
    {
      "path": "registry/rapid/ui/checkbox/checkbox.tsx",
      "content": "'use client'\n\nimport { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'\nimport { CheckIcon, MinusIcon } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\n/**\n * `readOnly` shows the value but prevents changing it. Unlike `disabled`, the checkbox stays focusable and is announced\n * as read-only (`aria-readonly`). Base UI blocks the change and sets `data-readonly`; we also keep `data-read-only`.\n */\nfunction Checkbox({ className, readOnly, ...props }: CheckboxPrimitive.Root.Props) {\n\treturn (\n\t\t<CheckboxPrimitive.Root\n\t\t\tdata-slot=\"checkbox\"\n\t\t\tdata-read-only={readOnly || undefined}\n\t\t\treadOnly={readOnly}\n\t\t\tclassName={cn(\n\t\t\t\t'peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary data-readonly:cursor-default data-readonly:border-dashed data-readonly:border-foreground/60 data-readonly:bg-muted/50 data-readonly:data-checked:border-foreground/60 data-readonly:data-checked:bg-muted/50 data-readonly:data-checked:text-foreground data-readonly:data-indeterminate:border-foreground/60 data-readonly:data-indeterminate:bg-muted/50 data-readonly:data-indeterminate:text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<CheckboxPrimitive.Indicator\n\t\t\t\tdata-slot=\"checkbox-indicator\"\n\t\t\t\tclassName=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n\t\t\t>\n\t\t\t\t{/* A minus for the indeterminate state, so it isn't shown as checked */}\n\t\t\t\t<CheckIcon aria-hidden=\"true\" className=\"in-data-indeterminate:hidden\" />\n\t\t\t\t<MinusIcon aria-hidden=\"true\" className=\"hidden in-data-indeterminate:block\" />\n\t\t\t</CheckboxPrimitive.Indicator>\n\t\t</CheckboxPrimitive.Root>\n\t)\n}\n\nexport { Checkbox }\n",
      "type": "registry:ui",
      "target": "components/ui/checkbox.tsx"
    }
  ],
  "type": "registry:ui"
}