Git Product home page Git Product logo

react-native-dismiss-keyboard's Introduction

react-native-dismiss-keyboard CircleCi npm version Downloads

A simple way to dismiss the keyboard programmatically in a react native application. A demo app can be found here.

Deprecated for React Native >= 0.35

This module extracts code from an undocumented React Native feature. The reason I wrote it is that the import of the internal module failed after updating and in some specific setups. The feature is now documented in React Native and may be used directly with the React Native Keyboard API. If your React Native version is high enough I can only encourage you to use React Natives implementation.

Web Views

This module targets React Native Views, therefore the solution will not work in React Native Web Views. Please use an alternative solution in your Web Views Javascript.

Add it to your project

  1. Run npm install react-native-dismiss-keyboard --save
  2. To import the library choose one of these options
  • var dismissKeyboard = require('react-native-dismiss-keyboard');
  • import dismissKeyboard from 'react-native-dismiss-keyboard';
  1. Run
    dismissKeyboard()
    anywhere in your code to close the keyboard.

Support

React Native Version react-native-dismiss-keyboard Version
>= 0.11 & < 0.23 < 1.0
>= 0.23 >= 1.0
>= 0.36 React Native Keyboard API

If you experience any restrictions or if it works on other versions, please let us know.

Contribution

Please make sure to run the tests before proposing a PR by running npm test.

react-native-dismiss-keyboard's People

Contributors

brentvatne avatar ckuijjer avatar danielmschmidt avatar gantman avatar renovate-bot avatar renovate[bot] avatar rodrigobdz avatar sscaff1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.