@depict-ai/react-ui ships a separate server build, selected automatically through the package’s node export condition. This page describes what that build does and does not render, so you can set correct expectations for frameworks like Next.js.
What renders on the server
Do you need "use client"?
Not for the SDK’s own exports: the published build prepends "use client"; to every file, so all @depict-ai/react-ui components and hooks are already client components. Your own components that call the SDK’s hooks follow the normal React Server Components rules — a component of yours that calls useSearchModal still needs its own "use client" directive (or a client parent).
Placing DepictProvider in the Next.js App Router
Mount DepictProvider exactly once, wrapping the part of the tree that uses Depict components — typically via a client wrapper component rendered from your root layout:
app/depict-wrapper.tsx
app/layout.tsx
DepictProvider renders its children unchanged; in the browser it initialises the SDK. You do not need to pass a navigateFunction in Next.js — see routing.
SEO expectations
Search results, category listing content, breadcrumbs, and quick links are not present in the server-rendered HTML — they are rendered client-side only. The SDK provides no server rendering of search or product listing content, so do not plan for listing content to be indexable from the initial HTML response.RecommendationGrid is the exception: it is rendered to HTML on the server and hydrated on the client. Note that its recommendations data still comes from a client-side fetch (fetchRecommendations throws on the server), so the server-rendered output is the grid structure, not recommendation content.Limits and behavior
- One
DepictProviderper page. Mounting a second one throws an error at runtime. - Back/forward scroll restoration on search and category pages is patched automatically by the provider. This patch does not work with React strict mode — with Next.js 13+ (strict mode on by default), scroll restoration requires
reactStrictMode: falseinnext.config.js. @depict-ai/js-uihas no server build; it targets browsers only. Use@depict-ai/react-uiin server-rendered React frameworks.

