{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch-12",
  "title": "Segmented switch",
  "description": "A wide track whose raised half slides under the chosen icon.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/switch/switch-12.tsx",
      "content": "import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\n\nimport { MoonIcon, SunIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nconst TRACK = [\n  'group/switch relative inline-grid h-8 shrink-0 cursor-pointer grid-cols-2 items-center rounded-full bg-foreground/[0.05] p-0.5 outline-none',\n  'focus-visible:ring-[3px] focus-visible:ring-ring/25 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n].join(' ');\n\nconst THUMB = [\n  'pointer-events-none absolute inset-y-0.5 start-0.5 w-[calc(50%-2px)] rounded-full bg-card shadow-[0_1px_2px_rgb(0_0_0/0.08)] hairline-ring ring-foreground/10',\n  'transition-[translate] duration-300 ease-(--ease-out-quint) data-checked:translate-x-full',\n  'dark:bg-foreground/[0.09] dark:ring-foreground/15',\n].join(' ');\n\nconst OPTION =\n  'pointer-events-none relative flex h-full w-9 items-center justify-center text-muted-foreground transition-colors duration-200';\n\nexport default function Switch12() {\n  return (\n    <SwitchPrimitive.Root\n      defaultChecked\n      aria-label='Dark mode'\n      className={TRACK}\n    >\n      <SwitchPrimitive.Thumb className={THUMB} />\n      <span\n        className={cn(OPTION, 'group-data-unchecked/switch:text-foreground')}\n      >\n        <SunIcon />\n      </span>\n      <span className={cn(OPTION, 'group-data-checked/switch:text-foreground')}>\n        <MoonIcon />\n      </span>\n    </SwitchPrimitive.Root>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "components",
    "switch"
  ],
  "type": "registry:component"
}