{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "type": "registry:ui",
  "title": "Toggle",
  "description": "A button that stays pressed (bold, favourite, mute), with aria-pressed.",
  "dependencies": [
    "radix-ui@^1.6.7"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/toggle.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/toggle.tsx",
      "content": "import { Toggle as T } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nexport const toggleClass =\n  'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-kh px-3 text-kh-small font-medium text-kh-ink-2 transition-colors duration-(--kh-dur) ' +\n  'hover:bg-kh-surface-2 hover:text-kh-ink focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus) ' +\n  'disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-kh-surface-3 data-[state=on]:text-kh-ink [&_svg]:size-4';\n\n/**\n * A two-state button that stays pressed (bold, mute, favourite). It carries aria-pressed. Give an icon-only toggle an\n * aria-label. For a setting that applies as a switch, use Switch.\n */\nexport function Toggle({ className, ...rest }: React.ComponentProps<typeof T.Root>) {\n  return <T.Root className={cn(toggleClass, 'border border-kh-line-strong bg-kh-surface shadow-kh-1 data-[state=on]:border-kh-ink', className)} {...rest} />;\n}\n"
    }
  ]
}
