Skip to content
Theme
endue.ai

Components, Content

Keycap

A keycap that shows a single key. A combination places several keycaps side by side.

Name in code Kbd

⌘K Command palette ShiftEnter New line Tab Get suggestions

A keycap that shows one key. For a combination, place several keycaps side by side.

Appearance

  • Height 20px, minimum width 20px, 6px horizontal padding, 12px text at weight 500, 4px corner radius.
  • The surface is muted with a 1px border (2px on the bottom only). The text is muted-foreground.
  • hot is the emphasis for the one key to press now. It uses the ink fill (primary) with primary-foreground text.

Markup

<kbd class="Kbd_kbd">⌘</kbd><kbd class="Kbd_kbd">K</kbd>
<kbd class="Kbd_kbd Kbd_hot">Tab</kbd>

Don’t

  • Don’t put a combination in one keycap, such as “⌘+K”.
  • Don’t use it for a shortcut inside a tooltip. Use the tooltip’s kbd slot, which is an outline with no fill.