Widgets <Index>


<Index> is the component that allows you to apply widgets to a dedicated index. It’s useful if you want to build an interface that targets multiple indices.


type: string 

index in which to search.

type: { Root: string|function, props: object } 

Use this to customize the root element. Default value: { Root: 'div' }

Example usage

import {InstantSearch, Index, SearchBox, Hits, Configure} from 'react-instantsearch/dom'; export default function Search() { return ( <InstantSearch appId="" apiKey="" indexName="index1"> <SearchBox/> <Configure hitsPerPage={1} /> <Index indexName="index1"> <Hits /> </Index> <Index indexName="index2"> <Hits /> </Index> </InstantSearch> ); }

CSS classes

This widget has no theming options.

Translation keys

This widget has no translations.