react-native-otp-column

1.0.4 • Public • Published

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:

Props type Default
numberOfCell Number required as props
value Number required state value
setOtpValue function required state setter function
style style Object Object
editable Boolean true

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.44latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.44
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i react-native-otp-column

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

5.85 kB

Total Files

4

Last publish

Collaborators

  • kailie