🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-native-text-input-otp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-text-input-otp

A light weight react-native and expo split text input

1.0.7
latest
Source
npm
Version published
Weekly downloads
306
-4.08%
Maintainers
1
Weekly downloads
 
Created
Source
NPM VERSIONNPM WEEKLY DOWNLOADSGITHUB STARYOUTUBE VIEWSNPM LIFETIME DOWNLOADS

🏳️‍🌈 React Native OTP Text Input

🟢 Splitted OTP Text Input for ReactNative and Expo powered apps

Android DemoiOS Demo

Light Weight and Robust Splitted Text Input.

  • Design split OTP component of your choice
  • Pass number of OTP digits by your choice
  • Fully Customizable by props
  • Very Easy to use
  • Make your apps professional in UI/UX

Compatibility

iOSAndroidExpo

🔌 Installation

$ npm install react-native-text-input-otp

OR

$ yarn add react-native-text-input-otp

😎 Displaying the otp input

All you need is to just import the otp text input component and then pass the required props to display the splitted otp text input as shown in the code snippet below:

import OtpTextInput from 'react-native-text-input-otp'

const App = () => {
  const [otp, setOtp] = React.useState('');

  return(
    <OtpTextInput 
        otp={ otp }
        setOtp={ setOtp }
        digits={5} 
    />
  )

};

For Live Demo (Expo Snack)

⭐ Props for the component

NameTypeReuiredDescription
otpstate variableYesState variable to store the otp
setOtpstate update methodYesMethod to update state variable
digitsnumericYesNo of otp split fields
stylestyle objectNoStyle of the input fields
fontStylestyle objectNoStyle of font in input fields
focusedStylestyle objectNoStyle of field when in focus

💲 Would you like to support me?

If you would like me come up with similar packages, buy me a cup of coffee to boost my energy.

Paypal

▶️ Watch Tutorial Video

Watch video

Keywords

otp

FAQs

Package last updated on 27 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts