react-native-otp-forminput

1.0.3 • Public • Published

RNOTP Logo

# react-native-otp-forminput

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

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

Author

Feel free to ask me questions here - @kedar09!

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i react-native-otp-forminput

    Weekly Downloads

    31

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    12.7 kB

    Total Files

    11

    Last publish

    Collaborators

    • kedar09