Components
BaseTextSearch
A search field for toolbars, compact by default, that can show its keyboard shortcut.
components/ui/inputs/BaseTextSearch.vue
View in the demo
Example
The last field shows its / shortcut while it is empty and not focused.
SearchSearchSearch
/
hotkey only displays the key. Register the shortcut itself with useHotkey, as explained in Keyboard shortcuts.
API
It also accepts every prop, slot and event of v-text-field, which it passes through.
Props
Name | Type | Default | Description |
|---|---|---|---|
compact | boolean | true | 36 px high for toolbars. Set it to false for the regular field height. |
hotkey | string | — | The key to display, such as /. |
v-model | string | "" | The search text. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: string] | — |
Accessibility
Give it an aria-label: it has no visible label.