Installation
npm
pnpm
yarn
bun
npx shadcn@latest add @dotui/kbdUsage
import { Kbd } from '@/components/ui/kbd';<Kbd>⌘</Kbd> + <Kbd>K</Kbd>Anatomy
Use Kbd for a single key. Wrap several in KbdGroup to present a key combination as one unit.
import { Kbd, KbdGroup } from '@/components/ui/kbd'
;<KbdGroup>
<Kbd>⌘</Kbd>
<Kbd>K</Kbd>
</KbdGroup>Examples
Basic Keys
Ctrl⌘KCtrl + B
Keyboard Shortcut
CtrlShiftP
In Tooltip
Input with Keyboard Hint
Space
API Reference
Kbd
A kbd displays a keyboard key or shortcut that triggers an action.
| Prop | Type | Default | |
|---|---|---|---|
KbdGroup
Groups multiple keyboard keys together to represent a key combination.
Supports all HTML attributes.
| Prop | Type | Default | |
|---|---|---|---|
Last updated on 7/9/2026