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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Minimal palette with default hotkey

vue

Custom hotkey and width with async loading

vue