Keyboard
A keyboard that shows a shortcut where it lives: its keys are lit, and keys pressed on the real keyboard press down on this one, so people can try the shortcut and see it land. The layout follows the reader's platform.
Press search on your keyboard.
When to use
- Teaching a product's key shortcuts in onboarding, docs or a what's-new note.
- A shortcut settings page, beside the recorder.
When not to use
- Listing many shortcuts; use the shortcut sheet.
- Inside dense app chrome; it is a teaching surface.
Installation
pnpm dlx shadcn@latest add @caliper/keyboard
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Keyboard
6 props
shortcutCodes
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes img semantics, with aria-label kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/keyboard.mdThe index of every part is at /llms.txt.