search
By default, search is added to your project in the top navigation bar in the far right side corner. You can use the search
configuration to customize search in the following ways:
- hide the search bar
- add a list of shortcuts for activating search
- add a list of suggested pages to the search modal
Options
Option | Type | Description |
---|---|---|
hide | boolean | Specifies if the search bar should be hidden. Default: false . |
shortcuts | [string] | List of keyboard shortcuts to activate search (for example, ctrl+f ). Default: / . |
suggestedPages | [Page item] | List of suggested pages. |
Page item object
Option | Type | Description |
---|---|---|
page | string | REQUIRED. Path to the file which represents the page to link to. |
label | string | Link text displayed for the item. |
labelTranslationKey | string | Link text key for the item used for localization. |
Examples
The following configuration hides the search bar.
search:
hide: true
The following configuration sets keyboard shortcuts that trigger search:
search:
shortcuts:
- ctrl+f
- cmd+k
- /
The following configuration sets suggested pages for the search modal window:
search:
suggestedPages:
- label: Home page
page: index.page.tsx
- page: /catalog/
Related options
- Learn more about the options for adding translated content in the l10n reference documentation.
- Find other options for adding items to the top navigation menu in the navbar reference documentation.
Resources
- Discover all the ways you can customize your project's navigation in the Configure navigation how-to documentation.
- View a list of the UI interface items you can translate in the Predefined translation keys list reference documentation.