Socket
Socket
Sign inDemoInstall

react-native-keyboard-listener

Package Overview
Dependencies
5
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-keyboard-listener

KeyboardListener component for React Native


Version published
Maintainers
1
Weekly downloads
729
decreased by-11.53%

Weekly downloads

Readme

Source

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

Keywords

FAQs

Last updated on 17 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc