{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "description": "Toggle to switch between states.",
  "dependencies": [
    "@radix-ui/react-switch"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/switch.tsx",
      "content": "\"use client\";\n\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Switch = React.forwardRef<\n  React.ComponentRef<typeof SwitchPrimitive.Root>,\n  React.ComponentProps<typeof SwitchPrimitive.Root>\n>(function Switch({ className, ...props }, ref) {\n  return (\n    <SwitchPrimitive.Root\n      aria-disabled={(props as any).disabled ? true : undefined}\n      className={cn(\n        \"peer inline-flex h-[1.15rem] w-8 shrink-0 touch-manipulation items-center rounded-full border border-transparent shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted motion-safe:duration-200 dark:data-[state=unchecked]:bg-input/80\",\n        className\n      )}\n      data-slot=\"switch\"\n      ref={ref}\n      type=\"button\"\n      {...props}\n    >\n      <SwitchPrimitive.Thumb\n        className={cn(\n          \"pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground\"\n        )}\n        data-slot=\"switch-thumb\"\n      />\n    </SwitchPrimitive.Root>\n  );\n});\n\nexport { Switch };\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "apiRef": "https://www.radix-ui.com/docs/primitives/components/switch#api-reference"
  },
  "docs": "https://www.radix-ui.com/primitives/docs/components/switch",
  "categories": [
    "component"
  ],
  "type": "registry:ui"
}