All Projects → zackify → react-native-autofocus

zackify / react-native-autofocus

Licence: other
Autofocus the next input field on enter in React Native

Programming Languages

javascript
184084 projects - #8 most used programming language

react-native-autofocus

npm install react-native-autofocus

Autofocus the next input field on enter in React Native.

Have you started with React Native, added a few inputs, and then realized you had to add refs just to focus onto the next input field? This little package solves that problem. Import your text input from this library and wrap them in a form:

import { Form, TextInput } from 'react-native-autofocus'

export default () => (
  <Form>
    <TextInput placeholder="test" />
    <TextInput placeholder="test 2" />
  </Form>
)

Hit enter inside your first input, and the next field will be focused. The logic is all abstracted for you!

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].