1.0.1 • Published 2 years ago

react-native-otp-timer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-otp-timer

A React-Native Component that will start a countdown on pressing Resend OTP"

install like this

npm i react-native-otp-timer

https://user-images.githubusercontent.com/75023861/176608314-235d203b-69c3-4b2d-884e-6bc79783673d.mp4

propsdetails
minutegive the minutes you want for countdown (must given prop if nothing to give then just give 0 )
secondgive the seconds you want (must given prop if nothing to give then just give 0 )
textcolorit will change the color of time
fontsizeit will change the font size of time
fontfamilyit will change the font family of time
labeltextit will change the text of label by default it was "ResendOTP"
labelfontsize,it will chnage the font size of label
labelfontfamily,it will change the font family of label
labelcolorit will change the color of label

simple usage with all props

import {StyleSheet, Text, View} from 'react-native';
import React from 'react';
import RnOtpTimer from 'react-native-otp-timer';

const App = () => {
  return (
    <View
      style={{
        flex: 1,
        justifyContent: 'center',
        flexDirection: 'column',
        alignSelf: 'center',
      }}>
      <RnOtpTimer
        minute={1}
        second={30}
        fontsize={20}
        fontfamily={'Poppins-Regular'}
        textcolor={'blue'}
        labelfontsize={20}
        labelfontfamily={'Poppins-Regular'}
        labelcolor={'blue'}
        labeltext="want otp again"
      />
    </View>
  );
};

export default App;

const styles = StyleSheet.create({});

License

MIT

Contact

Email: saurabhsatapathy0@gmail.com LinkedIn: https://www.linkedin.com/in/saurabh-satapathy-692a6a1b9/ GitHub: https://github.com/saurabh190802 Twitter: https://mobile.twitter.com/SaurabhSatapat1