Skip to main content
If you have a dependency listed below, make sure you have the minimum version or greater installed. You can also use parcel, vite or other bundlers, but we don’t know the minimum version for those tools yet.
The only required dependency of above is sass
@depict-ai/js-ui ships no server build and targets browsers only; if you render on the server, use @depict-ai/react-ui (see server-side rendering).

Browser support

By default, the exported versions of Depict packages are transpiled for older browsers (targeting ES10). This makes it easier for the Depict UI to function in older browsers by default, but also results in a larger network payload and poorer page performance. However, you may still need to add polyfills (see below). If you’re not keen on supporting older browsers, or you’d prefer to handle the transpilation process yourself, append /latest to all your imports to include the untranspiled version.

Choosing a build

Depict packages ship two builds, selected by the import path: The bare import (for example @depict-ai/react-ui) resolves to the ES10 build. To switch an existing codebase to /latest, find and replace across your .js/.ts/.tsx files: find (@depict-ai(?!/types)[^"';\s]*), replace with $1/latest.
The default search modal’s CSS uses container queries, which older browsers lack. For those browsers, use the classic modal.

Polyfilling

The ES10 build handles syntax, not missing APIs — older browsers may still need polyfills. Test your application in the oldest browser you target and add what is missing. Enable SDK logging first by running localStorage.debug = true and reloading (see the debugging section of the react-ui or js-ui introduction), and exercise as many UI features as possible — some polyfills are only needed for specific features. Bundle the polyfills you need with your own build (for example via core-js) rather than loading them from a third-party polyfill CDN at runtime. The polyfills Depict uses: