react-native-searchbox provides declarative props to query Elasticsearch, and bind UI components with different types of search queries. As the name suggests, it provides a default UI component for searchbox.
react-native-searchbox, you can use
yarn to get set as follows:
npm install @appbaseio/react-native-searchbox
yarn add @appbaseio/react-native-searchbox
react-native-searchbox requires react-native-vector-icons as a peer dependency. Expo or create-react-native-app projects include react-native-vector-icons out of the box, so all you need to do is install
If your project is a standard React Native project created using react-native init (it should have an ios/android directory), then you have to install the react-native-vector-icons along with
The following example renders an autosuggestion search bar(
search-component) with one custom component(
result-component) to render the results. The
result-component watches the
search-component for input changes and updates its UI when the user selects a suggestion.
You can check out the docs for API Reference over here.