0.0.2 • Published 3 years ago

@imthiyaz.muhd/rnotpinput v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

React Native Customisable OTP Input

Features

  • Supports any OTP Length (Defaults to 4)
  • Small Package Size
  • Auto Navigation back and forth between input fields
  • React-Native CLI Support

Documentation

Documentation

To install - run

  npm i @imthiyaz.muhd/rnotpinput

To Import to your project - run

  import OTPInput from "@imthiyaz.muhd/rnotpinput";

Props

Keep a state in your Parent Component to make the OTP input a controlled Comoponent

  • maxLength : Number of digits in your OTP

  • code - getter from the useState hook (entered OTP is in it) -- Required

  • setCode - setter from the useState hook -- Required

  • error - Error to be shown as a text if any

Authors