Skip to content
Browse docs and components

Kbd

kbd

A keyboard key and a chord of keys, rendered as real kbd elements with a keycap edge. For shortcut hints in menus, tooltips and empty states.

Responsive

Install

$npxshadcnadd@forme/kbd

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

KbdGroup

A chord: keys pressed together, with the separator hidden from assistive tech.

PropTypeDefaultDescription
keys*readonly string[]—

Also takes every prop of <span> attributes.

The other parts

  • KbdTakes <kbd> attributes