Kbd
Display keyboard shortcuts. Educate power users. Speed up workflows.
Search projects and invoices
/Installation
pnpm dlx nachui add kbdAnatomy
Sizes
Use the
size property to control the size of the <Kbd> component.Menu item
Toggle sidebar
Shortcut list
Save draft
Empty state
Open the command palette
Variants
You can toggle the keyboard styles by providing a
variant.Open the command palette⌘K
Close without saving the draftEsc
Key Groups
Use the
<KbdGroup> component to wrap multiple <Kbd> tags or group logically related commands with consistent spacing.Keyboard shortcuts
Open the command palette⌘K
Jump to a file⌘P
Comment on the selection⌘⇧M
Toggle the terminalCtrl`
API Reference
Kbd
Additional HTML properties like
className are spread directly to the <kbd> element.| Prop | Type | Default | Description |
|---|---|---|---|
size | 'default' | 'sm' | 'lg' | 'default' | Adjusts the interactive component's dimensions |
variant | 'default' | 'outline' | 'default' | Visual style of the element |
abbrTitle | string | - | Adds a title attribute, useful for abbreviations |
KbdGroup
Container for styling keyboard tags. Accepts common HTML properties (
HTMLAttributes<HTMLSpanElement>).Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.