Kbd
Displays keyboard keys and shortcuts. Keys physically press down when you set data-pressed.
Data Display
SearchK
New issueC
Go to inboxGI
Toggle sidebar\
Playground
Tweak the props, the preview and the code follow.
⌘+⇧+K
Press the keys on your keyboard
Props
<KbdGroup> <Kbd>⌘</Kbd> <span>+</span> <Kbd>⇧</Kbd> <span>+</span> <Kbd>K</Kbd> </KbdGroup>
Installation
npx @plumsydev/plum-ui add kbdUsage
import { Kbd, KbdGroup } from "@/components/ui/kbd"<KbdGroup>
<Kbd>⌘</Kbd>
<Kbd>K</Kbd>
</KbdGroup>Examples
Pressed state
Set data-pressed to sink the key — wire it to real keyboard events.
⇧⌥⌘K
Press the keys on your keyboard
Shortcut sheet
Rows light up when you press the matching shortcut.
Keyboard shortcuts — try them
- Open command menu⌘K
- New issueC
- Search/
- Go to inboxGI
- Toggle sidebar[
API Reference
Kbd
A styled kbd element.
| Prop | Type | Default |
|---|---|---|
data-pressedRenders the key in its pressed state. | boolean | — |
Notes
- Inside a Tooltip, keys automatically switch to inverted colors.