{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"switch","title":"Switch","description":"A toggle control for switching a single setting on or off instantly.","dependencies":["cn","@base-ui/react"],"files":[{"path":"components/ui/switch.tsx","content":"\"use client\"\n\nimport { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\nimport { cn } from \"cn\"\n\nfunction Switch({\n  className,\n  size = \"default\",\n  ...props\n}: SwitchPrimitive.Root.Props & {\n  size?: \"sm\" | \"default\"\n}) {\n  return (\n    <SwitchPrimitive.Root\n      data-slot=\"switch\"\n      data-size={size}\n      className={cn(\n        \"peer group/switch relative inline-flex shrink-0 items-center rounded-full border-2 transition-all outline-none group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary group-has-[:focus-visible]/field-label:data-checked:border-primary data-checked:focus-visible:border-primary data-unchecked:border-transparent data-unchecked:bg-fill-3 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n        className\n      )}\n      {...props}\n    >\n      <SwitchPrimitive.Thumb\n        data-slot=\"switch-thumb\"\n        className=\"pointer-events-none block rounded-full bg-primary-foreground shadow-sm ring-0 transition-transform not-dark:bg-clip-padding group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-checked:translate-x-[calc(100%-4px)] data-unchecked:translate-x-0 data-unchecked:bg-linear-to-b data-unchecked:from-white/8 data-unchecked:to-transparent data-unchecked:to-70% dark:data-unchecked:bg-neutral-500\"\n      />\n    </SwitchPrimitive.Root>\n  )\n}\n\nexport { Switch }\n","type":"registry:ui"}],"cssVars":{"theme":{"color-fill-3":"var(--fill-3)"},"light":{"fill-3":"oklch(0.556 0 0 / 12%)"},"dark":{"fill-3":"oklch(1 0 0 / 14%)"}},"categories":["forms"],"type":"registry:ui"}