Note
This documentation describes the GlobalSearchButton Vue component for native UI views, for Xml templates see global-search-button.
GlobalSearchButton
A button that opens the global search modal. Registers a Ctrl+Shift+F keyboard shortcut.
Import
import { GlobalSearchButton } from '@neos/app'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label |
boolean \| string |
true |
Show the button label. true = default label, string = custom label, false = icon only |
onSearch |
(query: string) => Promise<void> |
undefined |
Custom search handler called with the query string |
onKeyEnter |
(query: string, result: unknown) => void |
undefined |
Called when the user presses Enter on a search result |
Usage Examples
Default button in navigation header
<GlobalSearchButton />
Icon-only compact button
<GlobalSearchButton :label="false" />
Custom label
<GlobalSearchButton label="Search everything…" />
With custom search handler
<GlobalSearchButton :on-search="handleSearch" :on-key-enter="openResult" />