⚡ Lightning-fast search for React, by Algolia
npm install react-instantsearch- react-instantsearch
- Why
- Installation
- Getting started
- Documentation
- Playground
- Contributing
- License
React InstantSearch is an open-source React library that lets you create an instant search result experience using [Algolia][algolia-website]’s search API. It is part of the InstantSearch family:
React InstantSearch | [InstantSearch.js][instantsearch-github] | [Vue InstantSearch][instantsearch-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]
You should be using React InstantSearch if you want to:
- Design search experiences with best practices
- Customize your components at will
- Follow React principles
Note: If you are working with React Native, or otherwise do not use the DOM, check out react-instantsearch-core instead.
React InstantSearch is available on the npm registry. It relies on algoliasearch to communicate with Algolia APIs.
``sh`
yarn add algoliasearch react-instantsearchor
npm install algoliasearch react-instantsearch
Using React InstantSearch is as simple as adding these components to your app:
`javascript
import React from 'react';
import ReactDOM from 'react-dom';
import { liteClient as algoliasearch } from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch';
const searchClient = algoliasearch(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76'
);
const App = () => (
);
`
To learn more about the library, follow the [getting started guide][doc-getting-started].
The documentation is available on [algolia.com/doc][doc].
You can get to know React InstantSearch on [this playground][doc-playground].
Start by [adding components][doc-getting-started] and tweaking the display. Once you get more familiar with the library, you can learn more advanced concepts in [our guides][doc-guides].
We welcome all contributors, from casual to regular 💙
- Bug report. Is something not working as expected? [Send a bug report][contributing-bugreport].
- Feature request. Would you like to add something to the library? [Send a feature request][contributing-featurerequest].
- Documentation. Did you find a typo in the doc? [Open an issue][contributing-newissue] 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][contributing-label-easy], the [bugs][contributing-label-bug] or [chores][contributing-label-chore].
To start contributing to code, you need to:
1. Fork the project
1. Clone the repository
1. Install the dependencies: yarn`
Please read our contribution process to learn more.
React InstantSearch is MIT licensed.
[doc]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/
[doc-getting-started]: https://www.algolia.com/doc/guides/building-search-ui/getting-started/react/
[doc-guides]: https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/react/
[doc-playground]: https://codesandbox.io/s/github/algolia/instantsearch/tree/master/examples/react/default-theme
[algolia-website]: https://www.algolia.com/
[instantsearch-github]: https://github.com/algolia/instantsearch
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
[contributing-bugreport]: https://github.com/algolia/instantsearch/issues/new?template=BUG_REPORT.yml&labels=triage,Library%3A%20React+InstantSearch
[contributing-featurerequest]: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage,Library%3A%20React+InstantSearch&title=Feature%20request%3A%20
[contributing-newissue]: https://github.com/algolia/instantsearch/issues/new?labels=triage,Library%3A%20React+InstantSearch
[contributing-label-easy]: https://github.com/algolia/instantsearch/issues?q=is%3Aopen+is%3Aissue+label%3A%22Difficulty%3A+Easy%22+label%3A%22Library%3A%20React+InstantSearch%22
[contributing-label-bug]: https://github.com/algolia/instantsearch/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug%22+label%3A%22Library%3A%20React+InstantSearch%22
[contributing-label-chore]: https://github.com/algolia/instantsearch/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Chore%22+label%3A%22Library%3A%20React+InstantSearch%22