复制一段给 AI 编程工具的提示词,包含源码、依赖和用法
属性
KbdProps
同时支持以下类型的全部属性: React.ComponentProps<"kbd">
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| keyName | string | — | A key token such as "mod", "shift", "enter" or a literal like "K". Falls back to children. |
| platform | KbdPlatform | "mac" | — |
KbdGroupProps
同时支持以下类型的全部属性: Omit<React.ComponentProps<"span">, "children">
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| keys* 必填 | string[] | — | Combo as key tokens, e.g. ["mod", "K"] |
| platform | KbdPlatform | "mac" | — |
| separator | boolean | — | Show "+" between keys (the Mac style is usually joined without it) |
安装
$ npx shadcn@latest add https://chromotion.dev/r/kbd.json