Skip to content
⚡️ A JavaScript library for building performant and instant search experiences with Algolia.
JavaScript TypeScript Other
Branch: develop
Clone or download
Haroenv chore(examples): make hero image jpg (#4270)
JPG is a more fitting image format for pictures, since it compresses better. Instead of 700 & 790 kB, it's now 80 & 50 kB

This change has already happened on Vue, but not yet React & Angular
Latest commit f04dbe7 Dec 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore(deps): update circleci/node:8.16.2 docker digest to 3190a… (#4255) Dec 14, 2019
.github docs(readme): add InstantSearch banner (#4226) Nov 29, 2019
.storybook chore(storybook): fix css format (#4251) Dec 10, 2019
examples chore(examples): make hero image jpg (#4270) Dec 20, 2019
scripts feat(typescript): add declaration files (experimental) (#4220) Dec 10, 2019
src v4.1.1 Dec 20, 2019
stories refactor(panel): migrate Panel widget stack to TypeScript (#4268) Dec 18, 2019
test feat(router): plug router as a middleware (#4224) Dec 2, 2019
website chore(examples): add routing to e-commerce demo (#3921) Jul 11, 2019
.editorconfig chore(formatting): add .editorconfig (#2435) Oct 3, 2017
.eslintignore chore(examples): update e-commerce demo (#3856) Jun 14, 2019
.eslintrc.js feat(widgets): introduce `configureRelatedItems` as experimental (#4233) Dec 10, 2019
.gitignore feat(router): plug router as a middleware (#4224) Dec 2, 2019
.nvmrc chore(deps): update node.js (#4181) Nov 26, 2019
.prettierrc chore: add .prettierrc (#3131) Sep 20, 2018
.yarnrc fix(yarnrc): use empty string for save-prefix (#2739) Feb 15, 2018
CHANGELOG.md v4.1.1 Dec 20, 2019
CONTRIBUTING.md v4.1.0 Dec 10, 2019
LICENSE docs(react-instantsearch): remove mentions of ris (#2094) Apr 4, 2017
README.md docs(readme): add InstantSearch banner (#4226) Nov 29, 2019
babel.config.js refactor: migrate to Preact X (#4156) Oct 23, 2019
global.d.ts refactor(RoutingManager): migrate tests to TypeScript (#3762) May 14, 2019
jest.config.js feat(transformers): add tests (#4153) Nov 26, 2019
netlify.toml test: add End-2-End test suite (#4035) Sep 6, 2019
package.json v4.1.1 Dec 20, 2019
renovate.json chore: update Renovate to update the examples (#3869) Jun 20, 2019
tsconfig.checkjs.json chore(typescript): add type-check:js command (#4250) Dec 10, 2019
tsconfig.declaration.json feat(typescript): add declaration files (experimental) (#4220) Dec 10, 2019
tsconfig.json refactor: migrate to Preact X (#4156) Oct 23, 2019
wdio.local.conf.js test: add End-2-End test suite (#4035) Sep 6, 2019
wdio.saucelabs.conf.js test: add End-2-End test suite (#4035) Sep 6, 2019
yarn.lock chore(deps): update dependency rollup to v1.27.13 (#4258) Dec 19, 2019

README.md

InstantSearch.js

InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.


Version License Build Status Pull reminders

InstantSearch.js is a vanilla JavaScript library that lets you create an instant-search result experience using Algolia’s search API. It is part of the InstantSearch family:

InstantSearch.js | React InstantSearch | Vue InstantSearch | Angular InstantSearch | React InstantSearch Native | InstantSearch Android | InstantSearch iOS

Table of contents

Why

You should be using InstantSearch if you want to:

  • Design search experiences with best practices
  • Customize your components at will
  • Remain independent from external frameworks

Getting started

Using InstantSearch.js is as simple as adding this JavaScript code to your page:

// 1. Instantiate the search
const search = instantsearch({
  indexName: 'instant_search',
  searchClient: algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'),
});

search.addWidgets([
  // 2. Create an interactive search box
  instantsearch.widgets.searchBox({
    container: '#searchbox',
    placeholder: 'Search for products',
  }),

  // 3. Plug the search results into the product container
  instantsearch.widgets.hits({
    container: '#products',
    templates: {
      item: '{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}',
    },
  }),

  // 4. Make the brands refinable
  instantsearch.widgets.refinementList({
    container: '#brand',
    attribute: 'brand',
  }),
]);

// 5. Start the search!
search.start();

Edit on CodeSandbox

To learn more about the library, follow the getting started guide or check how to add it to your own project.

Installation

npm install instantsearch.js algoliasearch
# or
yarn add instantsearch.js algoliasearch

Documentation

The documentation is available on the Algolia website.

Demos

E-commerce Media Travel
E-commerce demo preview Media demo preview Tourism demo preview

See more demos on the website.

Playground

You can get to know InstantSearch.js on this playground.

Start by adding widgets and tweaking the display. Once you feel familiar with the library, we recommend following the getting started guide.

Browser support

We support the last two versions of major browsers (Chrome, Edge, Firefox, Safari).

Please refer to the browser support section in the documentation to use InstantSearch.js on other browsers.

Contributing

We welcome all contributors, from casual to regular 💙

  • Bug report. Is something not working as expected? Send a bug report.
  • Feature request. Would you like to add something to the library? Send a feature request.
  • Documentation. Did you find a typo in the doc? Open an issue and we'll take care of it.
  • Development. If you don't know where to start, you can check the open issues that are tagged easy, the bugs or chores.

To start contributing to code, you need to:

  1. Fork the project
  2. Clone the repository
  3. Install the dependencies: yarn
  4. Run the development mode: yarn start
  5. Open the stories

Please read our contribution process to learn more.

License

InstantSearch.js is MIT licensed.

You can’t perform that action at this time.