Skip to content

A react native view component to dismiss the keyboard when pressed outside of an interact-able component.

License

Notifications You must be signed in to change notification settings

harveyconnor/react-native-keyboard-dismiss-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-keyboard-dismiss-view

NPM version

A touch intercepting view to dismiss the keyboard.

Install

$ npm install react-native-keyboard-dismiss-view

Usage

React Native

import KeyboardDismissView, { dismissKeyboard } from 'react-native-keyboard-dismiss-view';

export default function Home() {
  return (
    <KeyboardDismissView style={{flex: 1}}>
      <TextInput
        placeholder="Email address"
      />
      <Button title="Submit" onPress={() => alert('pressed')} />
      <Button title="Dismiss keyboard" onPress={dismissKeyboard} />
    </KeyboardDismissView>
  );
}

About

A react native view component to dismiss the keyboard when pressed outside of an interact-able component.

Resources

License

Stars

Watchers

Forks

Packages