{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "kbd",
  "type": "registry:ui",
  "title": "Kbd",
  "description": "Keyboard key or key combo, platform-aware (⌘ on Apple, Ctrl elsewhere) and hydration-safe.",
  "dependencies": [],
  "registryDependencies": [
    "https://kuro.abstergo.fyi/r/kura-theme.json",
    "https://kuro.abstergo.fyi/r/kura-keys.json",
    "https://kuro.abstergo.fyi/r/use-platform.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/kura/kbd/index.ts",
      "type": "registry:ui",
      "target": "components/kura/kbd/index.ts",
      "content": "export { Kbd, type KbdProps } from \"./kbd\";\n"
    },
    {
      "path": "registry/kura/kbd/kbd.tsx",
      "type": "registry:ui",
      "target": "components/kura/kbd/kbd.tsx",
      "content": "\"use client\";\n\nimport type * as React from \"react\";\nimport { useIsApplePlatform } from \"@/hooks/kura/use-platform\";\nimport { cn } from \"@/lib/utils\";\nimport { formatKey, type KeyName, keyLabel } from \"@/lib/kura/keys\";\n\nexport interface KbdProps extends React.ComponentProps<\"kbd\"> {\n  /**\n   * Keys to render as a combo, e.g. `[\"mod\", \"k\"]`. `mod` renders ⌘ on Apple platforms and Ctrl\n   * elsewhere. When omitted, `children` is rendered as a single key.\n   */\n  keys?: readonly KeyName[];\n  /** `raised` = standalone keycap; `ghost` = inline inside buttons, tooltips and menus. */\n  variant?: \"raised\" | \"ghost\";\n  size?: \"sm\" | \"md\";\n  /** Render as pressed (used by KbdShortcut while the combo is held). */\n  pressed?: boolean;\n}\n\nconst keyBase =\n  \"inline-flex min-w-[1.6em] items-center justify-center font-kura-sans font-medium tabular-nums leading-none \" +\n  \"transition-[transform,background-color,box-shadow,color] duration-(--kura-duration-instant) ease-kura-out\";\n\nconst keyVariants = {\n  raised:\n    \"rounded-kura-xs bg-kura-surface text-kura-fg-muted shadow-[0_0_0_1px_var(--kura-border),0_1px_0_0_var(--kura-border-strong)] \" +\n    \"data-[pressed=true]:translate-y-px data-[pressed=true]:bg-kura-surface-sunken data-[pressed=true]:text-kura-fg data-[pressed=true]:shadow-[0_0_0_1px_var(--kura-border)] motion-reduce:data-[pressed=true]:translate-y-0\",\n  ghost:\n    \"rounded-kura-xs bg-kura-hover text-current opacity-80 data-[pressed=true]:bg-kura-active data-[pressed=true]:opacity-100\",\n} as const;\n\nconst keySizes = {\n  sm: \"h-[18px] px-1 text-[11px]\",\n  md: \"h-[22px] px-1.5 text-xs\",\n} as const;\n\n/**\n * A keyboard key or key combination. Platform-aware (⌘ on Apple, Ctrl elsewhere) and\n * hydration-safe. Combos read as one spoken label like \"Command K\" (visually hidden text; glyphs are aria-hidden).\n */\nexport function Kbd({\n  keys,\n  variant = \"raised\",\n  size = \"md\",\n  pressed = false,\n  className,\n  children,\n  ...props\n}: KbdProps) {\n  const apple = useIsApplePlatform();\n\n  if (!keys) {\n    return (\n      <kbd\n        data-slot=\"kbd\"\n        data-pressed={pressed}\n        className={cn(keyBase, keyVariants[variant], keySizes[size], className)}\n        {...props}\n      >\n        {children}\n      </kbd>\n    );\n  }\n\n  const label = keys.map((k) => keyLabel(k, apple)).join(\" \");\n  return (\n    <kbd\n      data-slot=\"kbd\"\n      data-pressed={pressed}\n      className={cn(\"inline-flex items-center gap-0.5 font-kura-sans\", className)}\n      {...props}\n    >\n      <span className=\"sr-only\">{label}</span>\n      {keys.map((k, i) => (\n        <kbd\n          key={`${k}-${i}`}\n          aria-hidden\n          data-slot=\"kbd-key\"\n          data-pressed={pressed}\n          className={cn(keyBase, keyVariants[variant], keySizes[size])}\n        >\n          {formatKey(k, apple)}\n        </kbd>\n      ))}\n    </kbd>\n  );\n}\n"
    }
  ],
  "categories": [
    "primitives",
    "keyboard",
    "key",
    "shortcut",
    "kbd"
  ],
  "docs": "Docs: https://kuro.abstergo.fyi/components/kbd · Markdown for agents: https://kuro.abstergo.fyi/components/kbd.md",
  "meta": {
    "kura": {
      "status": "stable",
      "whenToUse": [
        "Show a key or combo inline in text, menus, tooltips or docs.",
        "Building blocks for shortcut hints inside other components."
      ],
      "whenNotToUse": [
        "A labelled hint that should also bind the shortcut — use kbd-shortcut.",
        "A shortcut inside a tooltip — pass `shortcut` to tooltip."
      ]
    }
  }
}
