Skip to main content

Kbd

StorybookView in Storybook

Explore interactive examples and all component variations in our Storybook.

The Kbd component renders keyboard key labels in a visually distinct, monospaced style. It is useful for documenting shortcuts, showing hotkeys in UI hints, and building shortcut reference tables. It renders a native <kbd> element styled with a bordered, shadowed pill appearance.

Basic Usage

EnterEscapeTabSpace

Keyboard Shortcuts

Combine multiple Kbd elements with + separators to express multi-key shortcuts.

+K
Ctrl+Shift+P
Alt+F4
Ctrl+Z

Inline Usage

Kbd is an inline element and can be embedded directly inside paragraphs or tooltip content.

Press ⌘K to open the command palette and search for any action.

Use Tab and Shift+Tab to move focus between form fields.

Hit Escape at any time to dismiss the active dialog or popover.

To submit the form without a mouse, press Ctrl+Enter.

Shortcut Reference Table

Use Kbd to build structured shortcut references that users can quickly scan.

ActionmacOSWindows / Linux
Save+SCtrl+S
Undo+ZCtrl+Z
Redo+Shift+ZCtrl+Y
Find+FCtrl+F
Cut+XCtrl+X
Copy+CCtrl+C
Paste+VCtrl+V

Properties

Kbd

PropertyTypeDefaultDescription
classNamestringAdditional CSS classes to merge with the default styles.
childrenReactNodeThe key label or content rendered inside the element.
(All native kbd attributes)All standard HTML <kbd> attributes are forwarded to the underlying element.