Shortcut

A shortcut hint aligned to the end of a row.

Search⌘K
PaletteK
<Shortcut>⌘K</Shortcut>
<Shortcut keys={["⌘", "K"]} />

The keys form renders each key as a Kbd; the children form is plain muted text. Menus have their own version of this — DropdownMenu.Shortcut and its siblings — which is what you want inside one.

API

PropTypeDefault
keysreadonly string[]Render each key as a small Kbd chip. Omit it and children are shown as plain text.

Plus every <span> prop. Source: shortcut/components/shortcut.tsx.