{
  "$schema": "https://blode.co/ui/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "author": "Matthew Blode",
  "description": "A toggle control for switching between on and off states.",
  "dependencies": ["@base-ui/react"],
  "files": [
    {
      "path": "ui/switch.tsx",
      "content": "\"use client\";\n\nimport { Switch as SwitchPrimitive } from \"@base-ui/react/switch\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Switch = ({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) => (\n  <SwitchPrimitive.Root\n    className={cn(\n      \"peer inline-flex h-[24px] w-[42px] shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-disabled:cursor-not-allowed data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-50 data-unchecked:hover:bg-input-hover\",\n      className,\n    )}\n    data-slot=\"switch\"\n    {...props}\n  >\n    <SwitchPrimitive.Thumb\n      className={cn(\n        \"pointer-events-none block size-[18px] rounded-full bg-card shadow-lg ring-0 transition-transform data-checked:translate-x-[21px] data-unchecked:translate-x-[3px] dark:bg-card-foreground\",\n      )}\n      data-slot=\"switch-thumb\"\n    />\n  </SwitchPrimitive.Root>\n);\n\nexport { Switch };\n",
      "type": "registry:ui",
      "target": ""
    }
  ],
  "type": "registry:ui"
}
