DepictSearchProvider component from the installed package and create an instance of DepictSearchProvider:
Optional configuration
Beyondmerchant, market, searchPagePath, and locale, the constructor accepts the following options:
Customising price formatting
Price formatting is part of thelocale object. It applies to the price filter, result counts, and prices in the search modal; prices inside your own productCard are formatted by you. The type and its defaults:
price_formatting_:
Fetching search results without the UI
To use Depict search results in your own UI — for example a custom autocomplete — callfetchSearchResults on the provider instead of rendering the SDK’s components:
displayTransformers applied, so they include page_url.
Limits and behavior
- You can’t create more than one
DepictSearchProvideron the same page unless you give each one a uniqueuniqueInstanceKeyForState(for example"1","2", …), because instance state lives in the URL andhistory.stateand would otherwise collide.
Review the types or the reference to see what you can configure on the
DepictSearchProvider.
