Design System React

AlphaThis a work in progress. Your input will help us to improve it. Report issues or raise questions on GitHub.

Site search

JSX for this example
<React.Fragment />

Site search configuration

SiteSearch components can use the following props:

action (optional)
The value of the search form's action atttribute. Default is /search.
className (optional)
A CSS class name to pass to the component.
id
The value of the search input field's id attribute. Default is site-search
method (optional)
The form method to use. Default is GET.
name (optional)
The value of the search field's name attribute. Default is q.
placeholder (optional)
The value of the search field's placeholder attribute. Default is Search.

Autocomplete configuration

Autocomplete can be configured on a site search component by adding the following props:

autocompleteEndpoint
The endpoint used by the autocomplete.
autocompleteSuggestionMappingFunction (optional)
A JavaScript function that maps the results from the endpoint into the format that the Design System Autocomplete component expects.
minLength (optional)
The number of characters that need to be entered before requests are sent to the endpoint. Default is 3.