npm / @docsearch/react
@docsearch/react
What changed in @docsearch/react 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
11 breaking1 security12 new APIs and options4 behavior and defaults10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@docsearch/react 536 changes
Breaking changes 11
Closed Sidepanels are excluded from keyboard navigation and the accessibility tree while preserving conversation state.
FacetBar renders checkbox items instead of a radio group, allowing users to select multiple values per facet. Values within a facet are combined with OR; different facets are combined with AND.
Renames the Ask AI assistantId option to agentId.
Removes the Ask AI transport layer.
Ask AI-related props are now nested under a single root askai option.
askAi.indices is now a string array of index names; use askAi.searchParameters for per-index runtime overrides.
Renames the shimmer utility class; update custom style selectors that override it.
Renames the fadeIn keyframe to kebab-case; update custom style selectors that override it.
Renames the shimmerText keyframe to kebab-case; update custom style selectors that override it.
Removes the indexName prop from Sidepanel.
Renames the slideDown keyframe to kebab-case; update custom style selectors that override it.
Security 1
Sanitizes Ask AI Markdown HTML and URLs before rendering to prevent XSS.
New APIs and options 11
Adds a statically importable Sidepanel trigger entry point, allowing the panel and its Ask AI/Markdown dependencies to be dynamically imported only when needed.
Adds a dynamically importable Sidepanel panel entry point so its Ask AI/Markdown dependencies can be loaded only when needed.
Accepts both the legacy single-query input and the batched queries[] shape, and tolerates a missing output.
Adds per-index runtime overrides for Ask AI search parameters.
Exposes relatedSourcesTextPlural for translating plural related-source text.
Adds a font-family variable used across the search button, keyboard keys, modal, and sidepanel, so one override themes every DocSearch surface.
Adds faceted search with filter chips.
Adds a prop that renders a custom action in the modal footer before the Algolia logo.
Adds breadcrumbs to search hits.
Adds badges to search results.
Adds pluralTitleText; titleText is now the singular label and the trigger renders the count with the label.
Behavior and default changes 3
OR groups sharing a single facet key are recognized as that facet's default selection, in addition to single key:value entries.
Moves apiKey into @docsearch/core so it can be configured once and shared.
Moves appId into @docsearch/core so it can be configured once and shared.
Fixes and other changes 10
Fixes pressed feedback on Windows and Linux while preserving the hint's width.
Enter is ignored during IME composition, preventing conversion confirmation from selecting a search result or sending an Ask AI prompt.
Automatic sends now happen only after client-executed tools complete, preventing Ask AI from resending conversations after server-executed tool calls.
Fixes a crash when importing DocSearch bundles in Safari 14 caused by lookbehind feature detection selecting an unsupported regex pattern.
DocSearchAI now accepts Ask AI-specific modal translations.
Fixes the event not being called when selecting an Ask AI item with the Enter key.
Incomplete tool parts are pruned before resending after a stream is stopped mid-tool-call, preventing subsequent questions from being rejected.
The conversation is preserved when opening Ask AI from the results row.
Fixes the missing published export for the keyword-only <DocSearch /> component.
Prevents the slash search shortcut from intercepting key events on focused buttons.
@docsearch/react 42 changes
New APIs and options 1
Adds support for searching across multiple indexes.
Behavior and default changes 1
The Ask AI integration supports AI SDK v5.