alexmngn / React Native Keyboard Listener
KeyboardListener component for React-Native
Stars: ✭ 18
Programming Languages
javascript
184084 projects - #8 most used programming language
react-native-keyboard-listener
This component is a shortcut to listen to the keyboard when the component mounts.
Should work for React-Native 0.27+.
Installation
npm install --save react-native-keyboard-listener
Usage
Import the component into the file you want to use it:
import KeyboardListener from 'react-native-keyboard-listener';
Use the component directly in your code. The component won't render anything
<View>
<KeyboardListener
onWillShow={() => { this.setState({ keyboardOpen: true }); }}
onWillHide={() => { this.setState({ keyboardOpen: false }); }}
/>
</View>
Methods
onWillShow()
onWillHide()
onDidShow()
onDidHide()
onWillChangeFrame()
onDidChangeFrame()
Licence
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].