CommandPalette
Global command/search palette for quick actions.
CommandPalette
A global command palette for quick actions and search.
Basic Usage
Demo loads on client.
API
TxCommandPalette Props
| Name | Type | Default | Description |
|---|---|---|---|
modelValue | boolean | - | Visibility state |
commands | CommandPaletteItem[] | [] | Command list |
placeholder | string | 'Search commands' | Search placeholder |
emptyText | string | 'No commands found' | Empty text |
maxHeight | number | 320 | Max list height |
autoFocus | boolean | true | Auto focus input |
closeOnSelect | boolean | true | Close after select |
CommandPaletteItem
| Field | Type | Description |
|---|---|---|
id | string | Unique id |
title | string | Title |
description | string | Description |
keywords | string[] | Keywords |
icon | TxIconSource | string | Icon |
shortcut | string | Shortcut |
disabled | boolean | Disabled state |
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | (value) | Visibility state |
select | (item) | Select command |
open | - | Opened |
close | - | Closed |
update:query | (value) | Search input update |
Was this helpful?