1.0.0 • Published 1 year ago

react-native-otp-withpaste v1.0.0

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

Get Started

Installation

npm install react-native-otp-withpaste

Usage

import React,{useState} from 'react';
import OTPInput from 'react-native-otp-withpaste';

const App = () => {
  const [pasted, setpasted] = useState(null);
  
  return (
    <>
      <OTPInput
        title="Enter OTP"
        type="outline"
        onChange={code => {
          console.log(code);
        }}
        onPasted={pasted}
      />
    </>
  );
};

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
onPastedstringnull

Author

Feel free to ask me questions (mesut.altas2019@gmail.com) ~ mesutche