ICommand
interface
Navigation
A single command/action exposed by OrigamCommandPalette — holds the stable id, label, optional description, icon, keyboard shortcut hint, group, extra search keywords and the perform handler.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- idrequiredstring
- Stable identifier used as the v-for key, the ARIA aria-activedescendant target and the dedup key in the registry.
- labelrequiredstring
- Visible primary label. Drives the default fuzzy-match input.
- descriptionstring
- Secondary line shown under the label.
- iconTIcon
- Optional prepend icon.
- kbdReadonlyArray<string>
- Keyboard shortcut hint rendered through OrigamKbd next to the action. Display-only — does NOT bind a global listener.
- groupstring
- Group label (e.g. "Navigation", "Settings"). Commands sharing the same group render under the same subheader.
- keywordsReadonlyArray<string>
- Extra search terms that should match the command (e.g. ["preferences", "config"] for a "Settings" entry).
- performrequired() => void | Promise<void>
- Handler invoked when the command is selected. May be async — the palette awaits the returned promise before closing when closeOnSelect is true.
- disabledboolean
- Disabled commands stay visible but cannot be selected.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Registering a command via the composable
Declaring commands inline on the palette