This interface is used to configure the search settings for the Inkeep widgets.

All properties are optional.

placeholderstringPlaceholder text for the search input field. Default 'Search for anything...'.
prefilledQuerystringThe prefilled query that will appear in the search bar. Default undefined.
shouldOpenLinksInNewTabbooleanDetermines whether links should open in a new tab. Default false.
isControlledSearchQuerybooleanDetermines whether the search query will be controlled by a wrapping component. Default false.
handleSearchQueryChange(query: string) => voidCallback for when the search query changes.
tabSettingsInkeepTabSettingsSettings for tabs in search results.
maximumHitsLimitnumberMax number of results to show for a search. Default is 40.
debounceTimenumberNumber of milliseconds to wait before fetching search results. Default is 0.
searchFunctionsRefReact.Ref<SearchFunctions>Ref to the component's callable functions for search.
submitOnEnterOnlybooleanDetermines whether to submit the search query on enter instead of on query change. Cannot be combined with isControlledSearchQuery. Default false.


These settings control the tab behavior in search results.

All properties are optional.

isAllTabEnabledbooleanEnables the 'All' tab in search results. Default true.
rootBreadcrumbsToUseAsTabsstring[]Specify a list of root breadcrumbs to put into individual tabs. For example, ['Docs', 'Blog']. Only applies for search results that include breadcrumbs. Default [].
tabOrderByLabelstring[]Controls the order of the tabs. Defaults to ['All', ...rootBreadcrumbsToUseAsTabs, ...defaultExternalSources]. defaultExternalSources includes GitHub, Discourse, Slack and Discord.
disabledDefaultTabsstring[]List tabs you to not show. Useful for disabling certain default tabs, like 'GitHub' or 'Slack' as standalone tabs.
alwaysDisplayedTabsstring[]Tabs that should always be displayed, including during the loading animation and regardless of whether there are any matching search results. Defaults to ['All', ...rootBreadcrumbsToUseAsTabs].


import { type InkeepSearchSettings } from "@inkeep/widgets";

export const searchSettings: InkeepSearchSettings = {
  placeholder: "Search for anything...",
  prefilledQuery: null,
  shouldOpenLinksInNewTab: false,
  isControlledSearchQuery: false,
  handleSearchQueryChange: undefined,
  tabSettings: {
    isAllTabEnabled: true,
    rootBreadcrumbsToUseAsTabs: ["Docs", "Blog", "Case Studies"], // Example usage
    tabOrderByLabel: undefined,
    disabledDefaultTabs: undefined,
    alwaysDisplayedTabs: undefined,
  searchFunctionsRef: undefined,