@zettabrasil/react-native-searchbar

1.0.12 • Public • Published

npm size

React Native SearchBar

Search Bar for iOS & Android with voice and history features for React Native.

Install

npm i -S @zettabrasil/react-native-searchbar

We will need to install first the following libraries to get this working well:

@react-native-community/voice.

npm i -S @react-native-community/voice

Need to include permissions for NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription inside Info.plist for iOS. See the included VoiceTest for how to handle these cases.

<dict>
  ...
  <key>NSMicrophoneUsageDescription</key>
  <string>Description of why you require the use of the microphone</string>
  <key>NSSpeechRecognitionUsageDescription</key>
  <string>Description of why you require the use of the speech recognition</string>
  ...
</dict>

@react-native-community/async-storage.

npm i -S @react-native-community/async-storage

Link the iOS package

npx pod-install

Usage

Checkout the example

This library depends on react-native-root-siblings to work properly. So, it is necessary to make the following configuration in the root app component:

import { SearchBarWrapper } from '@zettabrasil/react-native-searchbar';

export default function App() {
  return (
    <SearchBarWrapper>
      <View>
        { /* app content */ }
      </View>
    </SearchBarWrapper>
  );
}

Readme

Keywords

Package Sidebar

Install

npm i @zettabrasil/react-native-searchbar

Weekly Downloads

4

Version

1.0.12

License

MIT

Unpacked Size

52.8 kB

Total Files

33

Last publish

Collaborators

  • zetta_brasil
  • darleikroth
  • galiazzi
  • mschaeferbr