Kbd
Keyboard shortcut styling
Display keyboard shortcuts with proper styling.
Usage
Renders as:
press ⌘ + K to search
Shortcut
use the Shortcut component for multiple keys:
Common keys
| key | display |
|---|---|
| ⌘ | command (mac) |
| ⌃ | control |
| ⇧ | shift |
| ⌥ | option/alt |
| ↵ | enter |
| ⎋ | escape |
| ← → ↑ ↓ | arrows |
Props
kbd
| prop | type | description |
|---|---|---|
| children | ReactNode | Key to display |
Shortcut
| prop | type | description |
|---|---|---|
| keys | string[] | Array of keys to display |