Atelier UI

搜索组件…

搜索组件…

Kbd Shortcuts

键帽组件与组合键,按 Mac/Windows 切换符号,演示快捷键速查表。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

KbdProps

同时支持以下类型的全部属性: React.ComponentProps<"kbd">

属性类型默认值说明
keyNamestring—A key token such as "mod", "shift", "enter" or a literal like "K". Falls back to children.
platformKbdPlatform"mac"—

KbdGroupProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"span">, "children">

属性类型默认值说明
keys* 必填string[]—Combo as key tokens, e.g. ["mod", "K"]
platformKbdPlatform"mac"—
separatorboolean—Show "+" between keys (the Mac style is usually joined without it)

安装

$ npx shadcn@latest add https://chromotion.dev/r/kbd.json

同类组件