Socket
Socket
Sign inDemoInstall

react-native-text-input-otp

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Install size
13.4 kB
Created

Readme

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

FAQs

Last updated on 27 Feb 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc