Kbd

Displays a keyboard shortcut or key combination.

$bunx shadcn@latest add @nx-ui/kbd
Registry item
Installs withutils

Basic usage

A single key or short label rendered in the Kbd primitive.

EscTabShiftK

Key combinations

Group related keys with KbdGroup, which lays them out with a consistent gap.

KCtrlShiftP

With an icon

Icons inside Kbd are auto-sized to size-3, for glyphs like return or arrow keys.

Inside a tooltip

Kbd carries a variant for in-data-[slot=tooltip-content] contexts — the border drops and the background turns translucent to sit on the tooltip surface.

Shortcut legend

A realistic composition — the keyboard-shortcut legend for the Nexus collections table.

  • Jump to next round
  • Jump to previous round
  • Approve selected intake
  • Open Nexus command paletteK

API reference

Exported parts and their props, extracted from the component source.