Kbd
Display one keyboard key as shortcut notation.
Use Kbd to display one key in a shortcut hint. Combine keys with KbdGroup; showing a shortcut does not register a keyboard handler.
Basic usage#
Playground#
Press⌘Kto open command menu
Props
Slots
Anatomy#
Usage#
Root styling#
Kbd renders one <kbd> root, so use direct class and style props for an individual keycap. Configure kbd.base.root in your Theme to share keycap presentation; classes and styles are reserved for components with multiple rendered slots.
Keyboard notation#
Use Kbd for a single key or keycap in instructional text. It conveys displayed keyboard notation; application-level shortcut registration and platform-specific behavior remain outside the component.
Examples#
Shortcut composition#
Props#
Props for the Kbd component. Renders a <kbd> element by default.
Prop