Keyboard Shortcut Hint
A cheat sheet of tactile keycaps that knows your platform (⌘ ⌥ ⇧ vs Ctrl Alt Shift); hold real keys and matching caps sink and light up, complete a combo and its row confirms. Exports Kbd for inline hints.
Try it: Hold ⇧ or ⌘ / Ctrl and watch the caps; press Esc or ⇧ ?.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/kbd-shortcut-hint.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/kbd-shortcut-hint. You can also copy the source into components/ui/kbd-shortcut-hint.tsx (view on GitHub).
Usage
import { KbdShortcutHint } from '@/components/ui/kbd-shortcut-hint'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
shortcuts | Shortcut[] | DEFAULT_SHORTCUTS | { id, label, keys: ['mod', 'k'], group? } — 'mod' is ⌘ or Ctrl. |
platform | 'auto' | 'mac' | 'other' | 'auto' | Glyph set. |
listen | boolean | true | Light caps from real key presses. |
onTrigger / title | (s) => void / string | 'Keyboard shortcuts' | Combo callback; heading ('' hides). |
className | string | — | Extra classes merged onto the card. |
Dependencies
motionlucide-react
Related Product UI components
- Inset Settings List
An iOS-style grouped inset list with tinted icon tiles, hairlines inset to the label edge, switches whose knob stretches on press, and choice rows that push a detail page with a parallax slide and…
- Feedback State Panel
One surface for the screens nobody designs — empty, error, offline, permission and success — each with its own glyph and motion character, copy that names the next step, and a primary action with a…
- Rolling Number Stepper
A quantity field whose changed digits roll in the direction of travel, accelerates on press-and-hold like a hardware stepper, and nudges sideways with a reason at its bounds. A real spinbutton you…
- Date Range Picker
A calendar that previews the range as you hover with a continuous tinted band between endpoint pills, month pages that slide in the direction you move, preset chips, full grid keyboard support and a…
- File Drop Uploader
A calm dropzone that lifts and tints on drag-over, then gives each file its own row with a spring progress hairline, a tick that pops on completion, and errors that say what went wrong with one-tap…
- Sortable Data Table
A dense, quiet deployments table: sortable headers with aria-sort, search and status filter chips, rows that glide to their new order, hairline hover and selected tints, a bulk-action bar that…