{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "description": "On/off control for settings that apply immediately.",
  "dependencies": [
    "@radix-ui/react-switch"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/switch.tsx",
      "content": "\"use client\";\n\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport type { ComponentProps } from \"react\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\n/** For settings that apply immediately. Inside a form that is submitted, prefer a Checkbox. */\nfunction Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n  return (\n    <SwitchPrimitive.Root\n      data-slot=\"switch\"\n      className={cn(\n        \"peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent\",\n        \"transition-[color,background-color,box-shadow] outline-none motion-reduce:transition-none\",\n        \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n        \"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n        \"disabled:cursor-not-allowed disabled:opacity-50\",\n        className\n      )}\n      {...props}\n    >\n      <SwitchPrimitive.Thumb\n        data-slot=\"switch-thumb\"\n        className={cn(\n          \"bg-background pointer-events-none block size-4 rounded-full ring-0\",\n          // `translate` is what Tailwind 4 moves; the colour changes with it in dark mode.\n          \"transition-[transform,translate,background-color] duration-200 ease-out motion-reduce:transition-none\",\n          \"data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0\",\n          \"dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground\"\n        )}\n      />\n    </SwitchPrimitive.Root>\n  );\n}\n\nexport { Switch };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}