Base Pure CSS

Kbd

The keyboard-key look with a mono face and a 3D edge — shortcut help panels and inline references.

Real scenarios

The component as it is used in a product — not a specimen grid.

The shortcut card people actually keep open

Stack one kbd per key with a plus or nothing between them — the mono face and the pressed edge do the rest.

  • Open the command palette ⌘ K
  • New task on this board N
  • Search everything / S
  • Toggle the theme ⌘ ⇧ L
  • Close any dialog or drawer Esc
  • Move between tabs ← →

Inside a sentence

Refer to a key mid-thought without breaking the line height — kbd is sized to the text around it.

Press ⌘ K to jump anywhere; hold Shift while clicking to select a range, and ? brings this card back.

On Linux and Windows

Nothing is hardcoded to the Mac — swap the glyph per platform and the component could not care less.

Ctrl K · Ctrl Shift L

A kbd a day keeps the “how do I…” tickets away.

Important props

Important props
Prop Type Default What it does
slot string — The key glyph; stack several kbds for combos.

Snippet

<p>برای جست‌وجو <x-nx::kbd>⌘</x-nx::kbd> <x-nx::kbd>K</x-nx::kbd> را بزنید.</p>