01
Overview
A styled keyboard key element for displaying keyboard shortcuts in help text and command palettes.
Usage
02
When to use
Use when
- Calling out a keyboard shortcut inline within prose or a tooltip.
- Composing chorded shortcuts by rendering multiple kbd elements side by side.
Avoid when
- Displaying a block of source code — use code-block instead.
03
Examples
Basic kbd
Single keys and key chords styled like physical keyboard keys.
04
Props
| Name | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'md' | Keyboard key size. |
label | text | Key label content. | |
children | snippet |