1.0.4 • Published 1 year ago

react-native-otp-column v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

react-native-otp-column

Sample Screenshot

Guide :

Install package using

npm i react-native-otp-column

Use as given in below example

Example :

import React, { useState} from 'react';
import {View} from 'react-native';
import OtpColumn from 'react-native-otp-column';

const OtpComponent = props => {
  const [otp, setOpt] = useState('');

  return (
    <View style={{flex: 1}}>
      <OtpColumn 
          numberOfCell={6} 
          value={otp} 
          setOtpValue={setOpt} 
          //editable={false}
          style={{borderColor: 'black', borderWidth: 4, borderRadius: 20}}
      />
    </View>
  );
};

export default OtpComponent;

Props:

PropstypeDefault
numberOfCellNumberrequired as props
valueNumberrequired state value
setOtpValuefunctionrequired state setter function
stylestyle ObjectObject
editableBooleantrue