Kbd

Renders keyboard shortcut keys styled as physical keycaps. Pass a single key or an array for combos like ⌘K or Ctrl+Shift+P.


Single Keys & Combos

A single string renders one key. An array renders each key separated by +. The name meta resolves to ⌘ on Apple platforms and Ctrl otherwise; cmd always resolves to ⌘ and ctrl to Ctrl.

Single keys

Enter Escape Tab Space ⌘ ⌥ ⇧ ⌫

Key combinations

⌘+ K ⌘+ S ⌘+ Z ⌘+ ⇧+ Z Ctrl+ Alt+ Del ⌘+ ⌥+ Esc

In context

Save ⌘+ S
Open search ⌘+ K
Undo ⌘+ Z