ICommandPaletteProps

interface
Navigation

Props for OrigamCommandPalette — a global ⌘K command palette that fuzzy-searches registered commands, supports custom hotkeys, grouping, async loading and slot customisation.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

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

modelValue
boolean
Whether the palette is open. Used with v-model.
hotkey
TCommandPaletteHotkey | null
Global hotkey(s) that toggle the palette. Defaults to [["meta","k"],["ctrl","k"]]. Pass null to disable.
commands
ReadonlyArray<ICommand>
Static command list. When omitted the palette uses commands registered via the useCommand() global registry.
filter
TCommandPaletteFilter
placeholder
string
Placeholder of the search input (already-translated string).
emptyText
string
Empty-state message shown when no command matches the query.
maxHeight
number | string
Max height of the result list. Number → px.
width
number | string
Width of the palette dialog. Number → px.
loading
boolean
Display a loader inside the result list (use during async command fetches).
searchIcon
TIcon
loadingIcon
TIcon
closeOnSelect
boolean
Close the palette automatically when a command is selected.
closeOnEscape
boolean
Close when the user presses Escape.
closeOnBackdrop
boolean
Close when the user clicks the backdrop.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Minimal palette with default hotkey

vue

Custom hotkey and width with async loading

vue