Kbd
Displays keyboard shortcuts for an action
Usage
The Kbd component displays keyboard keys and shortcuts for an action. Use Kbd.Item to represent individual keys or key combinations.
Sizes
Use the size prop to change the visual scale of keys.
iconOnly
Place Kbd within text to render keys inline
Variants
Use the variant prop to change the visual style of keys.
Palettes
Use the colorPalette prop to apply different color themes to keys.
Navigation keys
This example showcase differet navigation keys such as ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Enter, PageUp, and PageDown.
Inline
Place Kbd within text to render keys inline
API Reference
KbdGroup
Groups multiple kbd component together
| Prop | Type | Default |
|---|---|---|
| variant | 'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost' | primary |
| as | React.ElementType | undefined |
| asChild | boolean | undefined |
KbdGroupSeparator
Separates kbd within a group
| Prop | Type | Default |
|---|---|---|
| variant | 'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost' | primary |
| as | React.ElementType | undefined |
| asChild | boolean | undefined |
Kbd
Renders a kbd component
| Prop | Type | Default |
|---|---|---|
| variant | 'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost' | primary |
| as | React.ElementType | undefined |
| asChild | boolean | undefined |

