Hotkeys
DisplayMITKeyboard shortcut reference list grouped by section.
bun add @otfdashkit/ui
Preview
HotkeysDisplay
Loading Storybook preview…
Code
@otfdashkit/uiimport { Hotkeys } from '@otfdashkit/ui'
export function Example() {
return (
<div className="space-y-3">
<div className="flex items-center gap-4">
<span className="text-sm w-32">Open palette</span>
<Hotkeys keys={['⌘', 'K']} />
</div>
<div className="flex items-center gap-4">
<span className="text-sm w-32">Save</span>
<Hotkeys keys={['⌘', 'S']} />
</div>
<div className="flex items-center gap-4">
<span className="text-sm w-32">Search</span>
<Hotkeys keys={['⌘', '⇧', 'F']} />
</div>
<div className="flex items-center gap-4">
<span className="text-sm w-32">Close</span>
<Hotkeys keys={['Esc']} />
</div>
</div>
)
}
Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.
Props
Props declared in the Hotkeys source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| keysrequired | string[] | ||
| className | string |