SakaniUI

Kbd

Renders a keyboard key, for documenting shortcuts inline.

⌘K

Chords

One Kbd per physical key reads more clearly than cramming a whole chord into a single cap.

⌘⇧P

Inline in prose

Press ⌘K to open the command menu, or Esc to close it.

Props

PropTypeDefaultDescription
childrenReactNodeThe key or chord to render.

Why it works this way

Why

  • It renders a real <kbd> element, so shortcuts are semantically marked as keys rather than styled text.

Don't

  • Don't show shortcuts that aren't wired up. A hint that does nothing erodes trust.