Skip to content

Otp inputs for apps secure pin or Google Authentication Code with paste

License

Notifications You must be signed in to change notification settings

recepaltas/react-native-otp-withpaste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native OTP With Paste

# react-native-otp-withpaste

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

Outline Example

Filled Example

Available props

Name Type Default
type filled or outline outline
defaultValue string ""
keyboardType string number-pad
cursorColor string #4C5457
borderColor string #8FA2A3
currentBorderColor string #3E517A
numberOfInputs number 4
imageUrl string null
imageStyle style Image style
title string null
titleStyle style Text style
subtitle string null
subtitleStyle style Text style
inputStyle style TextInput style
onFilledCode boolean false
onChange function {}
secureTextEntry boolean false
onPasted string null

Author

Feel free to ask me questions ([email protected]) ~ mesutche

About

Otp inputs for apps secure pin or Google Authentication Code with paste

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published