Search UI for React

Your search page, ready to put together.

intrface is Indx’s search interface: the search field, filters with live counts, results and pages, and an answer agent in the same field, as React components on npm. Arranged for you in three layouts, and open for your own parts.

npm i @indxsearch/intrface
On GitHubOn npm
@indxsearch/intrface
Search, filters and the answer agent

Any framework

The search isn’t tied to React, and the controls can be your own

The search itself runs without React or styles, for Vue, Svelte or a plain page. For your own controls, intrface works with UI SDK, a library of accessible components and behaviours that renders in React, Vue, Svelte, Solid and Web Components, and that AI agents can operate.

@indxsearch/intrface/core

The search on its own

createSearch holds the text, the filters, the order and the results, sends the searches and drops answers that arrive too late. Subscribe, render what it holds, call its actions. Its snapshot works with any store that compares by reference.

Bindings · UI SDK

Your controls, the same search

The bindings hand each control the search as a value, a change and its items: the text, a field’s values with their counts, a range, the order, the results. Use UI SDK’s components, or Base UI’s or Radix’s. UI SDK’s are visible to agents already, so with them SearchAgent is all a page needs to be one agents can operate.

FrameworkThe search, connected withReady-made controls
ReactuseSyncExternalStoreintrface’s components, or UI SDK’s
VueshallowRefUI SDK’s
SveltereadableUI SDK’s
Solidsubscribe()UI SDK’s
Web Componentssubscribe()UI SDK’s
A plain pagesubscribe()Your own

What stands out

More than a search box and a list

  1. 01 · Auto filters

    The filter column, from your data

    AutoFilters builds the filters from the dataset itself: a list for text, a range for numbers, a switch for true and false, a category menu for the levels you name. Fields that can’t be a useful filter are left out, and the names are made readable. Where the dataset’s owner has set its filters in the console, it shows those. A panel can also wait until it applies: shoe size is noise on an empty search of a whole shop, and the first thing wanted once the results are running shoes. It arrives at the foot of the column, so nothing on screen moves, or sits folded from the start and unfolds in its place.

  2. 02 · For agents

    A page agents can operate

    Wrapped in SearchAgent, your search page is one AI agents can read and work as data, through UI SDK’s agent bridge: your own assistant, or the visitor’s browser agent, with your rules on what they may do. Their searches can be counted apart from people’s.

  3. 03 · The search in the address

    Back, Forward and a link that works

    With routing on, the text, the filters, the order and the page live in the address. Back steps through what the visitor searched, a reload keeps their place, and a shared link opens the same search.

  4. 04 · Statistics

    What people search for, and choose

    The server counts the searches, a visitor typing a word as one search rather than one per letter, and select() reports the result they opened. The console’s Statistics shows what is searched for, what finds nothing and what is chosen. No cookie is set.

The code

One component, three layouts

SearchLayout arranges the parts for where your search lives: inside another page, a page of its own, or a box in your site’s header. Each area takes intrface’s parts or your own.

import { SearchProvider, SearchLayout, SearchResults,
  ValueFilterPanel, SortByPanel, ActiveFiltersPanel } from '@indxsearch/intrface';

<SearchProvider url={url} team={team} dataset="products" preAuthenticatedToken={token}>
  <SearchLayout
    filters={<>
      <ValueFilterPanel field="colour" label="Colour" />
      <SortByPanel startCollapsed />
    </>}
    above={<ActiveFiltersPanel />}
    results={<SearchResults>{product => <h3>{product.title}</h3>}</SearchResults>} />
</SearchProvider>

Coming from InstantSearch

The parts you know, by their names here

instantsearch.js’s widgets and the intrface part for the same job.

Forinstantsearch.jsintrface
The search fieldsearchBoxSearchInput typo-tolerant
The resultshits, infiniteHitsSearchResults with Load more
Results grouped by kindindex, one per kindSearchSections in one request
Numbered pagespaginationSearchPagination
A field’s values, with countsrefinementListValueFilterPanel as checkboxes, buttons or a toggle
One value at a timemenuValueFilterPanel control="radio"
A number rangerangeSlider, rangeInputRangeFilterPanel on a slider or typed
A histogram of the valuesNo widget of its ownRangeFilterPanel showHistogram
Bars to click intoNo widget of its ownHistogramFilterPanel finer at every click
Number bracketsnumericMenuBucketFilterPanel named or of equal width
Categories in levelshierarchicalMenuHierarchicalFilterPanel
Distance from a placegeoSearchNearFilterPanel Near me or your places
The filters oncurrentRefinements, clearRefinementsActiveFiltersPanel
The ordersortBySortByPanel
Filters from the dataNo widget of its ownAutoFilters
A description to filtersNo widget of its ownuseFilterSuggestion (Search or ask)
The page put togetherNo widget of its ownSearchLayout in three recipes

Questions

Before you install it

Do I need an Indx server?

Yes. intrface talks to the Indx server’s HTTP API. The server is source available, under the PolyForm Shield licence, and you run it yourself, on your own machine or in your own Azure subscription.

How do I install it?

npm i @indxsearch/intrface. Version 4 speaks the Indx 2.0 server’s API; npm brings systm, Indx’s design system, with it. It needs React 19.

Can I use it without React?

Yes. @indxsearch/intrface/core holds the search (the text, the filters, the order, the results) with no React and no styles. Subscribe to it from Vue, Svelte or a plain page and render what it holds, with UI SDK’s components or your own.

What does Search or ask need?

The Indx server 6.0, with Search or ask switched on for the dataset in the console, where you also write what the answer agent should know: about the site, about the fields, and anything else. intrface’s components then offer to ask where the dataset allows it.

Can I use my own components?

Yes. Every area of SearchLayout takes your own content, and the bindings (useSearchTextBinding, useFacetBinding, useRangeBinding, useSortBinding, useResultsBinding) connect your own controls to the search.

Do I have to choose the filters myself?

No. AutoFilters builds the filter column from the dataset, or from the panels its owner set in the console: which fields, their names and order, how each is drawn, and whether it shows always or only once it applies to the results. Choose the panels yourself, as on this page, when you want them your way.

Build your search page