Skip to content

Kbd ​

Key combo

A shortcut hint: beside a menu item, in a tooltip, in the command palette (which renders these itself), in a "press ← / → to navigate" line. keys takes the combo as an array and joins it with +; a single key can go in the slot. The markup is the HTML spec's own — a <kbd> of <kbd>s — so assistive tech reads it as keys, and the uppercase is CSS only: "Ctrl" stays "Ctrl" when read aloud.

Show the symbol the user's platform shows: ⌘ on a Mac, Ctrl elsewhere. The component doesn't detect the platform; pass what fits (navigator.platform or your own setting).

Basic
⌘KCtrlShiftPEscpress ← / → in the gallery

Usage ​

ts
import { BlessKbd } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
keysstring[]—keys joined with + ; slot wins if present

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.