{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "title": "Switch",
  "description": "shadcn switch as a two-state pixel toggle with a dithered on side.",
  "dependencies": [
    "cn",
    "radix-ui"
  ],
  "registryDependencies": [
    "@ui95/theme"
  ],
  "files": [
    {
      "path": "components/ui/switch.tsx",
      "content": "\"use client\"\n\nimport { cn } from \"cn\"\nimport { Switch as SwitchPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nfunction Switch({\n  className,\n  size = \"default\",\n  ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\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-stretch pixel-border border-border bg-card after:absolute after:-inset-x-3 after:-inset-y-2 aria-invalid:border-dashed aria-invalid:border-destructive data-[size=default]:h-6 data-[size=default]:w-11 data-[size=sm]:h-5 data-[size=sm]:w-8 data-disabled:cursor-not-allowed data-disabled:border-muted-foreground\",\n        className\n      )}\n      {...props}\n    >\n      <span\n        aria-hidden=\"true\"\n        className=\"pointer-events-none absolute inset-y-0 left-0 hidden w-1/2 bg-foreground dither-50 group-data-checked/switch:block group-data-disabled/switch:bg-muted-foreground\"\n      />\n      <SwitchPrimitive.Thumb\n        data-slot=\"switch-thumb\"\n        className=\"pointer-events-none relative block h-full w-1/2 pixel-border border-border bg-secondary bevel-raised offset-shadow-none data-checked:translate-x-full group-data-disabled/switch:border-muted-foreground group-data-disabled/switch:bg-muted\"\n      />\n    </SwitchPrimitive.Root>\n  )\n}\n\nexport { Switch }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "sounds": {
      "switch.on": {
        "note": "Lowpassed noise snap, a stepped sub thump and a high sine click, held at 8 kHz",
        "layers": [
          {
            "wave": "noise",
            "frequency": 0,
            "attack": 0.0006,
            "decay": 0.00535,
            "gain": 0.32,
            "filter": {
              "type": "lowpass",
              "frequency": 1130,
              "q": 1.51
            },
            "curve": 4.4,
            "delay": 0
          },
          {
            "wave": "noise",
            "frequency": 0,
            "frequencyEnd": 427,
            "pitchTime": 0.072,
            "attack": 0.0079,
            "decay": 0.022,
            "gain": 0.3,
            "filter": {
              "type": "lowpass",
              "frequency": 127,
              "q": 0.7
            },
            "pitchSteps": 7,
            "curve": 2.3
          },
          {
            "wave": "sine",
            "frequency": 1370,
            "attack": 0.0005,
            "decay": 0.0055,
            "gain": 0.4,
            "pitchTime": 0.081,
            "curve": 3,
            "delay": 0,
            "filter": {
              "type": "highpass",
              "frequency": 2000,
              "q": 0.7
            },
            "frequencyEnd": 1060
          }
        ],
        "crush": {
          "sampleRate": 8000
        }
      },
      "switch.off": {
        "note": "Lowpassed noise snap 53 ms late over a faint low rumble",
        "layers": [
          {
            "wave": "noise",
            "frequency": 0,
            "attack": 0.0003,
            "decay": 0.006,
            "gain": 0.61,
            "filter": {
              "type": "lowpass",
              "frequency": 2200,
              "q": 1.21
            },
            "curve": 4.9,
            "delay": 0.053
          },
          {
            "wave": "noise",
            "frequency": 0,
            "frequencyEnd": 170,
            "pitchTime": 0.015,
            "attack": 0.001,
            "decay": 0.03,
            "gain": 0.05,
            "filter": {
              "type": "lowpass",
              "frequency": 2000,
              "q": 0.7
            }
          }
        ]
      }
    }
  },
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
