Components/KeyboardShortcut

KeyboardShortcut

Styled keyboard shortcut display using the kbd HTML element.

Installation

Examples

Common shortcuts

Display keyboard combinations with styled key badges.

⌘+K
Open command palette
⌘+⇧+P
Command palette (alt)
Ctrl+Z
Undo
⌘+S
Save
Escape
Close

In a shortcuts reference table

Typical usage in a help panel.

Keyboard shortcuts

New file
⌘+N
Save
⌘+S
Search
⌘+F
Command menu
⌘+K

API Reference

PropTypeDefaultDescription
keys*string[]requiredArray of key strings to display.
separatorstring'+'Separator between keys.
size'sm'|'md'|'lg''md'Controls font size.