4.13.2-q.1 • Published 3 years ago

@tnir/instantsearch.js v4.13.2-q.1

Weekly downloads
1,364
License
MIT
Repository
github
Last release
3 years ago

Version License Build Status

InstantSearch.js with Q is an additionaly JavaScirpt library for the smartest routing URL, based on InstantSearch.js v4, 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 Q

Why

You should be using InstantSearch with Q only if you want to:

  • Use InstantSearch.js with the smartest and the shortest routing URL without any repeated coding

otherwise use Algolia's InstantSearch.js instead.

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'),
  routing: { stateMapping: instantsearch.stateMappings.singleIndexQ('instant_search') },
});

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();

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

Installation

npm install @tnir/instantsearch.js algoliasearch
# or
yarn add @tnir/instantsearch.js algoliasearch

Documentation

The documentation is available on the Algolia website.

Demos

Developer docsTODO
TODO

See general demos on Algolia's original 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.

Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the library.

Contributing

We welcome all contributors, from casual to regular 💙

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.

4.13.2-q.1

3 years ago

4.13.2-q

3 years ago

4.13.1-q

3 years ago

4.13.0-q

3 years ago

4.12.0-q

3 years ago

4.9.2-q

3 years ago

4.10.0-q

3 years ago

4.11.0-q

3 years ago

4.9.1-q

3 years ago

4.9.0-q

3 years ago

4.8.6-q

3 years ago

4.8.7-q

3 years ago

4.8.4-q

3 years ago

4.8.5-q

3 years ago

4.8.3-q

3 years ago

4.8.2-q

3 years ago

4.8.1-q

4 years ago

4.8.0-q

4 years ago

4.7.2-q

4 years ago

4.7.1-q.2

4 years ago

4.7.1-q.1

4 years ago

4.7.1-q

4 years ago

4.7.1-q-alpha.0

4 years ago