1.0.0 • Published 2 years ago

enzo21otp v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-otp-form

npm Supports Android, iOS, and Web MIT License

React Native component for OTP Input Form

Alt text Alt text Alt text

Getting started

yarn add react-native-otp-form or npm install react-native-otp-form --save

Usage

Example

import {OTP} from 'react-native-otp-form';
  <OTP
        codeCount={6}
        containerStyle={{marginTop: 50}}
        otpStyles={{backgroundColor: '#eee'}}
    />

Check out the example project for more examples.

Props

TypeRequiredDescription
codeCountYesHow many otp box/character
containerStyleNoStyles for container View
otpStyleNoStyles for each box TextInput
onTypingNoCallback to get otp when user typing
onFinishNoCallback to get otp value when user finish filled all boxes

Running the Example app

While developing, you can run the example app to test your changes.

Setup

  • Clone the repository
  • Go to Example folder
  • Run yarn install

Start the app

  • Run yarn android to run on Android
  • Run yarn ios to run on iOS

TODO

  • XXXX
  • XXXX

License

The library is released under the MIT licence. For more information see LICENSE.