HotKeyPadCommand
Interface for defining individual commands in the command palette.Properties
Unique identifier for the command. Must be a non-empty string.
Display name of the command shown in the palette. Must be a non-empty string.
Icon to display next to the command. Can be:
- A Simple Icons slug (e.g.,
"github","typescript") - Custom HTML string containing
<svg>,<img>, or<i>tags - Empty string for no icon
Keyboard shortcut to trigger the command. Must be a non-empty string in the format
"Cmd+Key" or "Ctrl+Shift+Key". Maximum of 2 keys are supported. Cannot use browser/system reserved shortcuts like Ctrl+T, Ctrl+N, or Ctrl+W.Section name to group related commands. Commands without a section are placed in an “Unlisted” group.
Function to execute when the command is triggered. Receives the HotKeyPad instance element as a parameter.
Example
HotKeyPadOptionsProps
Configuration options for initializing a HotKeyPad instance.Properties
Key to close the command palette. Can be any valid keyboard key.
Placeholder text for the search input field.
Message displayed when no commands match the search query.
The letter key used in combination with Cmd/Ctrl to open the palette. For example,
"K" creates the shortcut Cmd+K or Ctrl+K.