1.0.7 • Published 1 year ago

react-native-text-input-otp v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago
NPM VERSIONNPM WEEKLY DOWNLOADSGITHUB STARYOUTUBE VIEWSNPM LIFETIME DOWNLOADS

🟢 Splitted OTP Text Input for ReactNative and Expo powered apps

  • 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

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago