{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "description": "Turns a setting on or off, taking effect the moment it's flipped.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://www.prfct.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "components/ui/switch.tsx",
      "content": "\"use client\"\n\nimport { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n  className,\n  size = \"default\",\n  ...props\n}: SwitchPrimitive.Root.Props & {\n  size?: \"sm\" | \"default\"\n}) {\n  return (\n    <SwitchPrimitive.Root\n      data-slot=\"switch\"\n      data-size={size}\n      className={cn(\n        \"peer group/switch relative inline-flex shrink-0 items-center rounded-full p-0.5 outline-none\",\n        // Track and thumb geometry live in variables so the thumb can stretch on press.\n        \"h-5 w-(--track) [--thumb:1rem] [--track:2.25rem] active:not-data-disabled:[--thumb:1.25rem]\",\n        \"data-[size=sm]:h-4 data-[size=sm]:[--thumb:0.75rem] data-[size=sm]:[--track:1.75rem] data-[size=sm]:active:not-data-disabled:[--thumb:0.9375rem]\",\n        \"transition-[background-color] duration-base ease-standard\",\n        \"after:absolute after:-inset-x-1 after:-inset-y-2\",\n        \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\",\n        \"data-checked:bg-brand data-unchecked:bg-input\",\n        \"hover:not-data-disabled:data-checked:bg-brand-10 hover:not-data-disabled:data-unchecked:bg-gray-10\",\n        \"aria-invalid:data-unchecked:bg-danger-9\",\n        \"data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n        className\n      )}\n      {...props}\n    >\n      <SwitchPrimitive.Thumb\n        data-slot=\"switch-thumb\"\n        className={cn(\n          \"pointer-events-none block h-full w-(--thumb) rounded-full bg-white shadow-[0_1px_2px_0_oklch(0_0_0/0.2),0_0_0_0.5px_oklch(0_0_0/0.04)]\",\n          \"transition-[translate,width] duration-spring ease-spring\",\n          \"data-checked:translate-x-[calc(var(--track)-var(--thumb)-0.25rem)]\"\n        )}\n      />\n    </SwitchPrimitive.Root>\n  )\n}\n\nexport { Switch }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}