{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "description": "A switch whose thumb stretches while pressed.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/ui/switch.tsx",
      "content": "'use client';\n\nimport { Switch as SwitchPrimitive } from '@base-ui/react/switch';\n\nimport { cn } from '@/registry/ndeko/lib/utils';\n\ntype SwitchProps = Omit<SwitchPrimitive.Root.Props, 'className'> & {\n  className?: string;\n};\n\nconst THUMB = [\n  'pointer-events-none block h-4 w-4 rounded-full bg-white shadow-[0_1px_2px_rgb(0_0_0/0.2),0_0_0_var(--hairline)_rgb(0_0_0/0.04)]',\n  'transition-[translate,width] duration-200 ease-(--ease-out-strong)',\n  'group-active/switch:w-5 data-checked:translate-x-3 group-active/switch:data-checked:translate-x-2',\n  'rtl:data-checked:-translate-x-3 rtl:group-active/switch:data-checked:-translate-x-2',\n].join(' ');\n\nfunction Switch({ className, ...props }: SwitchProps) {\n  return (\n    <SwitchPrimitive.Root\n      data-slot='switch'\n      className={cn(\n        'group/switch peer bg-foreground/15 inline-flex h-5 w-8 shrink-0 cursor-pointer items-center rounded-full p-0.5 transition-colors duration-200 outline-none',\n        'focus-visible:ring-ring/25 data-checked:bg-primary dark:bg-foreground/20 dark:data-checked:bg-primary focus-visible:ring-[3px] data-disabled:cursor-not-allowed data-disabled:opacity-50',\n        className\n      )}\n      {...props}\n    >\n      <SwitchPrimitive.Thumb data-slot='switch-thumb' className={THUMB} />\n    </SwitchPrimitive.Root>\n  );\n}\n\nexport { Switch, type SwitchProps };\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "primitives"
  ],
  "type": "registry:ui"
}