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

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