0.0.11 • Published 3 years ago

react-native-otp-field v0.0.11

Weekly downloads
52
License
MIT
Repository
github
Last release
3 years ago

react-native-otp-field

React Native OTP Field

:one: :two: :three: :four: :five:

Installation

npm i react-native-otp-field

RN < 0.63

npm i react-native-otp-field@0.0.7

A tiny library that works on both android and iOS.

Props

PropsTypeDescription
lengthNumberOTP length
valueStringOTP string
onChangeFunctioncalled when OTP is changed with new value as argument
textFieldStyleObjectstyle for text field
containerStyleObjectstyle for text field container.
errorstringerror text to display.
errorStyleObjectstyle for error container.

Note: It accepts all other props of RN TextField

Usage:

import OTPField from 'rn-otp-field';

render() {
  return {
    ...
    <OTPField
      length={5}
      value={'123'}
      error={'Please fill in complete OTP.'}
    />
    ...
  };
}

Image of OTPField

0.0.11

3 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago