1.0.3 • Published 7 months ago

react-native-otp-forminput v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Get Started

Installation

npm install react-native-otp-forminput

Usage

import React from 'react';
import OTPInput from 'react-native-otp-forminput';

const App = () => {
  return (
    <>
      <OTPInput
        title="Enter OTP"
        type="outline"
        onChange={code => {
          console.log(code);
        }}
      />
    </>
  );
};

export default App;

Usage

Available props

NameTypeDefault
typefilled or outlineoutline
defaultValuestring""
keyboardTypestringnumber-pad
cursorColorstring#4C5457
borderColorstring#8FA2A3
currentBorderColorstring#3E517A
numberOfInputsnumber4
imageUrlstringnull
imageStylestyleImage style
titlestringnull
titleStylestyleText style
subtitlestringnull
subtitleStylestyleText style
inputStylestyleTextInput style
onFilledCodebooleanfalse
onChangefunction{}
secureTextEntrybooleanfalse

Author

Feel free to ask me questions here - @kedar09!