{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "description": "Toggles a single option on or off, or selects any number of options from a set — committed when the form is submitted.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://www.prfct.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "components/ui/checkbox.tsx",
      "content": "\"use client\"\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n  return (\n    <CheckboxPrimitive.Root\n      data-slot=\"checkbox\"\n      className={cn(\n        \"peer group/checkbox relative inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-input bg-field text-brand-foreground shadow-xs outline-none\",\n        \"transition-[background-color,border-color,box-shadow] duration-fast ease-standard\",\n        // Expand the hit area to 24×24 without changing layout (WCAG 2.5.8).\n        \"after:absolute after:-inset-1\",\n        \"hover:not-data-disabled:border-gray-10\",\n        \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\",\n        \"data-indeterminate:border-brand data-indeterminate:bg-brand data-checked:border-brand data-checked:bg-brand\",\n        \"aria-invalid:border-danger-9 aria-invalid:data-checked:border-danger-9 aria-invalid:data-checked:bg-danger-9\",\n        \"data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n        \"group-has-disabled/field:opacity-50\",\n        className\n      )}\n      {...props}\n    >\n      <CheckboxPrimitive.Indicator\n        keepMounted\n        data-slot=\"checkbox-indicator\"\n        className=\"pointer-events-none flex items-center justify-center\"\n      >\n        <svg\n          viewBox=\"0 0 16 16\"\n          fill=\"none\"\n          stroke=\"currentColor\"\n          strokeWidth={2}\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          aria-hidden=\"true\"\n          className=\"size-3.5\"\n        >\n          {/* The check draws itself like a pen stroke. */}\n          <path\n            d=\"M3.5 8.5 6.5 11.25 12.5 4.75\"\n            pathLength={1}\n            className=\"transition-[stroke-dashoffset] duration-base ease-enter [stroke-dasharray:1] [stroke-dashoffset:1] group-data-indeterminate/checkbox:hidden group-data-checked/checkbox:[stroke-dashoffset:0]\"\n          />\n          <path\n            d=\"M4 8h8\"\n            className=\"hidden group-data-indeterminate/checkbox:block\"\n          />\n        </svg>\n      </CheckboxPrimitive.Indicator>\n    </CheckboxPrimitive.Root>\n  )\n}\n\nexport { Checkbox }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}