Search UI widgets
Search.io comes with a set of easy to integrate search widgets. Learn how to customize the widgets.
Search widgets are discrete blocks of JSON code that utilize the Search.io React SDK to render a variety of search widgets for your website.
Use the Search UI Designer in the Search.io admin console to design your search interface. Once completed, it will generate the code for the search widget to embed in your website.

Configuration

All widgets follow the structure below. The script tag is wrapped in a div with the data-widget attribute specifying the widget.
1
<div data-widget="widget-name">
2
<script type="application/json">
3
{
4
"account": "ACCOUNT_ID",
5
"collection": "COLLECTION_ID",
6
"pipeline": "PIPELINE_NAME",
7
...
8
}
9
</script>
10
</div>
11
<script async src="https://cdn.search.io/embed/1/loader.js"></script>
Copied!
The following configuration properties are available across all widgets. Generally they contain account and collection details, as well variables, theming information.
Name
Type
Default
Description
pipeline
string (required)
_
The pipeline configuration. See Pipeline overview.
account
string (required)
_
The account configuration (available in the credentials section in the Search.io admin interface).
collection
string (required)
_
The collection to query (available in the credentials section in the Search.io admin interface).
endpoint
string
'//jsonapi.sajari.net'
The endpoint configuration.
preset
'shopify' | 'website' | ''
''
The collection template. The set value affects the default values of properties such as buttonSelector.
tracking
'event' | 'click' | 'posneg'
'click'
Enable tracking to give you insights into the search behavior of your users and how your content is performing.
variables
Variables
_
Define simple key -> value pair object used for every search request. The configuration is specified as Variables properties.
config
Config
_
Defines mapping between key/value pair params to be sent with each and every request .The configuration is specified as Config properties.
fields
_
Map fields in your data to the required fields to display in the UI. The configuration is specified as FieldDictionary properties.
defaultFilter
string
_
A default filter to apply to all search requests.
currency
string
'USD'
The currency code to use for any formatted price values.
theme
Theme
_
Set basic color options for the interface. The configuration is specified as Theme properties.
customClassNames
_
Add CSS class names to components. See Available className.
disableDefaultStyles
boolean
false
Disable the default styles of components.
importantStyles
boolean
true
Add !important to the provided styles to override any CSS clashes that usually result in strange styling.
1
Copied!
Copy link