Skip to content

Data Display

Kbd

A styled keyboard key for documenting shortcuts.

stableNo JS requiredBuilt on <kbd>hydrateless/kbd.css

A styled keyboard key for documenting shortcuts, built on the native <kbd> element. CSS-only.

Kbd

Live
K

CSS variables

Override these on any ancestor to theme the component. See the theme studio to preview changes live.

CSS variableUsed for
--hl-surfaceKey background.
--hl-borderKey border and bottom edge.
--hl-radius-smCorner radius.

Accessibility

  • Use real <kbd> elements so shortcuts are semantic, not just styled text.

Released under the MIT License.