Skip to main content
Import the DepictProvider component from the installed package and use this component to wrap your entire application’s component tree as shown:
We call the product data that you receive for each product card that you have to render display. YourDisplay is a type definition of your specific display. Please ask Depict for this.

Optional configuration

Beyond merchant, market, and locale, DepictProvider accepts the following options:

Customising price formatting

Price formatting is part of the locale 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:
To customise it, spread the imported locale and override price_formatting_:

Limits and behavior

  • Mount exactly one DepictProvider per page — a second mounted instance throws an error. To use Depict on multiple routes, mount the provider once at the top of your component tree.
  • Multiple SearchPage or CategoryPage instances on the same page are supported, but each needs a unique stateKey prop (for example "1", "2", …) so their URL and history state stay separate; a duplicate stateKey throws. Set the same stateKey on a BreadCrumbs/QuickLinks component to associate it with a specific CategoryPage.
  • locale is required and must be a locale object imported from @depict-ai/react-ui/locales, not a string.
Review the types or the reference to see what you can configure on DepictProvider.
If you’re seeing a type error after providing YourDisplay, don’t fret and go to the next step