🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

instantsearch.js

Package Overview
Dependencies
Maintainers
6
Versions
431
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instantsearch.js

instantsearch.js is a library of widgets to build high performance instant search experiences using Algolia

0.8.2
Source
npm
Version published
Weekly downloads
361K
-14.17%
Maintainers
6
Weekly downloads
 
Created

What is instantsearch.js?

instantsearch.js is a library for building performant and instant search experiences with Algolia. It provides a set of widgets and tools to create highly customizable search interfaces.

What are instantsearch.js's main functionalities?

Search Box

The search box widget allows users to input their search queries. It connects to the Algolia index and fetches results based on the user's input.

const search = instantsearch({
  indexName: 'instant_search',
  searchClient: algoliasearch('YourApplicationID', 'YourSearchOnlyAPIKey')
});

search.addWidget(
  instantsearch.widgets.searchBox({
    container: '#searchbox'
  })
);

search.start();

Hits

The hits widget displays the search results. It can be customized to show different attributes of the search results and highlight the matching parts of the query.

search.addWidget(
  instantsearch.widgets.hits({
    container: '#hits',
    templates: {
      item: '<div>{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}</div>'
    }
  })
);

Refinement List

The refinement list widget allows users to filter search results based on specific attributes, such as categories. It provides checkboxes for each attribute value.

search.addWidget(
  instantsearch.widgets.refinementList({
    container: '#refinement-list',
    attribute: 'categories'
  })
);

Pagination

The pagination widget enables users to navigate through pages of search results. It provides controls for moving to the next or previous page and jumping to specific pages.

search.addWidget(
  instantsearch.widgets.pagination({
    container: '#pagination'
  })
);

Other packages similar to instantsearch.js

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts