Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 2.51 KB

search-ui-react.searchbarprops.md

File metadata and controls

29 lines (21 loc) · 2.51 KB

Home > @yext/search-ui-react > SearchBarProps

SearchBarProps interface

The props for the SearchBar() component.

Signature:

export interface SearchBarProps 

Properties

Property Type Description
customCssClasses? SearchBarCssClasses (Optional) CSS classes for customizing the component styling.
geolocationOptions? PositionOptions (Optional) Configuration used when collecting the user's location. Definition: https://w3c.github.io/geolocation-api/#position_options_interface.
hideRecentSearches? boolean (Optional) Hides recent searches if true.
onSearch? onSearchFunc (Optional) A callback which is called when a search is ran.
onSelectVerticalLink? (data: { verticalLink: VerticalLink; querySource: QuerySource; }) => void (Optional) A function which is called when a vertical link is selected.
placeholder? string (Optional) The search bar's placeholder text.
recentSearchesLimit? number (Optional) Limits the number of recent searches shown.
showVerticalLinks? boolean (Optional) Shows vertical links if true, set to false on default.
verticalKeyToLabel? (verticalKey: string) => string (Optional) A function which returns a display label for the given verticalKey.
visualAutocompleteConfig? VisualAutocompleteConfig (Optional) The configuration options for Visual Autocomplete.