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.
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.
- modelValueboolean
- Whether the palette is open. Used with v-model.
- hotkeyTCommandPaletteHotkey | null
- Global hotkey(s) that toggle the palette. Defaults to [["meta","k"],["ctrl","k"]]. Pass null to disable.
- commandsReadonlyArray<ICommand>
- Static command list. When omitted the palette uses commands registered via the useCommand() global registry.
- filterTCommandPaletteFilter
- placeholderstring
- Placeholder of the search input (already-translated string).
- emptyTextstring
- Empty-state message shown when no command matches the query.
- maxHeightnumber | string
- Max height of the result list. Number → px.
- widthnumber | string
- Width of the palette dialog. Number → px.
- loadingboolean
- Display a loader inside the result list (use during async command fetches).
- searchIconTIcon
- loadingIconTIcon
- closeOnSelectboolean
- Close the palette automatically when a command is selected.
- closeOnEscapeboolean
- Close when the user presses Escape.
- closeOnBackdropboolean
- 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
Custom hotkey and width with async loading