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.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

id
required
string
Stable identifier used as the v-for key, the ARIA aria-activedescendant target and the dedup key in the registry.
label
required
string
Visible primary label. Drives the default fuzzy-match input.
description
string
Secondary line shown under the label.
icon
TIcon
Optional prepend icon.
kbd
ReadonlyArray<string>
Keyboard shortcut hint rendered through OrigamKbd next to the action. Display-only — does NOT bind a global listener.
group
string
Group label (e.g. "Navigation", "Settings"). Commands sharing the same group render under the same subheader.
keywords
ReadonlyArray<string>
Extra search terms that should match the command (e.g. ["preferences", "config"] for a "Settings" entry).
perform
required
() => 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.
disabled
boolean
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

typescript

Declaring commands inline on the palette

vue