{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "description": "The Material checkbox, including the indeterminate state.",
  "dependencies": [
    "@base-ui/react@^1.7.0",
    "lucide-react@^1.33.0"
  ],
  "registryDependencies": [
    "https://guillermo-rebolledo.github.io/materialcn/r/materialcn-theme.json",
    "https://guillermo-rebolledo.github.io/materialcn/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/ui/checkbox.tsx",
      "content": "import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * Material 3 checkbox: an 18dp box with a 2dp outline that fills with the\n * primary color when checked. The 48dp touch target is added with a\n * pseudo-element so it does not affect layout.\n */\nimport { CheckIcon, MinusIcon } from \"lucide-react\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n  return (\n    <CheckboxPrimitive.Root\n      data-slot=\"checkbox\"\n      className={cn(\n        // Kit: 18dp box, 2dp corner (not the 4dp xs step), 2dp stroke.\n        \"group/checkbox peer relative flex size-4.5 shrink-0 cursor-pointer items-center justify-center rounded-[2px] border-2 border-m3-on-surface-variant outline-none \" +\n          \"transition-colors duration-(--m3-spring-effects-fast-duration) ease-(--m3-spring-effects-fast) \" +\n          // Widen the hit target to M3's 48dp touch target.\n          \"after:absolute after:-inset-[15px] \" +\n          // 40dp circular state layer (8 / 10 / 10 %) in the content colour.\n          \"before:pointer-events-none before:absolute before:-inset-[11px] before:rounded-full before:bg-m3-on-surface before:opacity-0 \" +\n          \"before:transition-opacity before:duration-(--m3-spring-effects-fast-duration) before:ease-(--m3-spring-effects-fast) \" +\n          \"hover:not-disabled:before:opacity-8 focus-visible:before:opacity-10 active:not-disabled:before:opacity-10 \" +\n          \"data-checked:before:bg-m3-primary data-indeterminate:before:bg-m3-primary aria-invalid:before:bg-m3-error \" +\n          // Unselected stroke darkens to On Surface while interacting.\n          \"data-unchecked:hover:not-disabled:border-m3-on-surface data-unchecked:focus-visible:border-m3-on-surface data-unchecked:active:not-disabled:border-m3-on-surface \" +\n          // Focus indicator wraps the 40dp state layer.\n          \"focus-visible:outline-m3-secondary focus-visible:outline-3 focus-visible:outline-offset-[11px] \" +\n          \"disabled:cursor-not-allowed data-disabled:cursor-not-allowed disabled:border-m3-on-surface/38 data-disabled:border-m3-on-surface/38 \" +\n          \"aria-invalid:border-m3-error \" +\n          \"data-checked:border-m3-primary data-checked:bg-m3-primary data-checked:text-m3-on-primary \" +\n          \"data-indeterminate:border-m3-primary data-indeterminate:bg-m3-primary data-indeterminate:text-m3-on-primary \" +\n          \"data-checked:disabled:border-transparent data-checked:data-disabled:border-transparent data-checked:disabled:bg-m3-on-surface/38 data-checked:data-disabled:bg-m3-on-surface/38 \" +\n          \"data-indeterminate:disabled:border-transparent data-indeterminate:data-disabled:border-transparent data-indeterminate:disabled:bg-m3-on-surface/38 data-indeterminate:data-disabled:bg-m3-on-surface/38 \" +\n          \"aria-invalid:data-checked:border-m3-error aria-invalid:data-checked:bg-m3-error aria-invalid:data-checked:text-m3-on-error \" +\n          \"aria-invalid:data-indeterminate:border-m3-error aria-invalid:data-indeterminate:bg-m3-error aria-invalid:data-indeterminate:text-m3-on-error\",\n        className\n      )}\n      {...props}\n    >\n      <CheckboxPrimitive.Indicator\n        data-slot=\"checkbox-indicator\"\n        className=\"grid place-content-center text-current [&>svg]:size-4 [&>svg]:stroke-3\"\n      >\n        <CheckIcon className=\"group-data-indeterminate/checkbox:hidden\" />\n        <MinusIcon className=\"hidden group-data-indeterminate/checkbox:block\" />\n      </CheckboxPrimitive.Indicator>\n    </CheckboxPrimitive.Root>\n  )\n}\n\nexport { Checkbox }\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "forms"
  ],
  "type": "registry:ui"
}