Skip to main content
Signature

Import

See this widget in action

Preview this widget and its behavior.

About this widget

This widget lets you apply widgets to a specific index. It’s useful when building interfaces that target multiple indices such as federated searches. The position of index in the widgets tree affects which search parameters apply. Widgets that create search parameters forward them to their child index widgets.
JavaScript
The only exception to this rule is when two widgets own the same part of your UI state, like two searchBox widgets or two refinementList widgets on the same attribute. In that case, the latter takes precedence and overrides the search parameters.
JavaScript
The same rule applies when you nest multiple index widgets.

Examples

JavaScript

Options

string
The index to search into. This option is required unless isolated is true.
JavaScript
string
default:"value provided for indexName"
An identifier for the index widget.Providing an indexId lets different index widgets target the same Algolia index. It’s helpful for routing. It lets you find the refinements that match an index widget.
JavaScript
boolean
default:false
By default, an index widget is included in the main InstantSearch request. When isolated is true, the widget performs its own search requests instead. It doesn’t send an initial search request when InstantSearch starts. Instead, it searches only after one of its child widgets changes the search state.When isolated is true, the index:
  • Searches separately instead of being included in the main search request.
  • Isn’t included in the URL or UI state.
  • Isn’t included in server-side rendering.
You can omit indexName when isolated is true. EXPERIMENTAL_isolated is a deprecated alias. Use isolated instead.
JavaScript

Methods

Adds one or more widgets to the index.
JavaScript
Removes one or more widgets from the index widget. To be properly removed, the widget instances you pass must have a dispose() method.
JavaScript
Replaces one widget with another, in place. Use it to change a widget’s parameters without losing the state that widget owns: the previous widget’s UI state is handed over to the new one.State the new widget doesn’t claim anymore, such as a refinement on an attribute that changed, is dropped, as when you remove a widget. The new widget also keeps the position of the widget it replaces, so the order in which widgets contribute to the search parameters is unchanged.The previous widget must have a dispose() method, and the new one an init() or a render() method.
JavaScript
Last modified on September 2, 2026