Skip to content

Kbd

Free

Shows a key or a shortcut in text, such as a search hint, a shortcut in a menu, or a key in help text.

  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Write the key as it shows on the keyboard: "⌘", "Ctrl", "Esc".

search-shortcut-hint.tsx

Kbd

<kbd>
PropTypeDefaultDescription
size"default""lg""default"
variant"default""ghost""default"
...props<kbd> attributes—Every other attribute goes to the <kbd>, with a ref.

KbdGroup

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it to show a key as people see it on the keyboard: "⌘", "Ctrl", "Esc", "Enter".
  • Put keys that people press together in a KbdGroup. It has no plus sign.
  • For keys pressed one after the other, put the word "then" between two keys.
  • Kbd does nothing on a click. For an action, use a Button.

Kbd is the native <kbd>. It is not a button: it has no focus stop and takes no pointer events.

Kbd and KbdGroup set dir="ltr", so "⌘ K" keeps its key order on a right-to-left page.

  1. AddedKbd.
Open the release