Socket
Socket
Sign inDemoInstall

otp-timer

Package Overview
Dependencies
8
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    otp-timer

otp timer component


Version published
Weekly downloads
750
decreased by-9.96%
Maintainers
2
Install size
3.38 MB
Created
Weekly downloads
 

Readme

Source

otp-timer

Install

Install by executing either npm install otp-timer or yarn add otp-timer

Demo

react-otp-timer

Usage?

import OtpTimer from 'otp-timer'
import React, { Component } from "react";

 handleClick=()=>{
   //desired function to be performed on clicking resend button
 }

export default  class Otp extends Component {
  render () {
    return (
      <div>
        <Timer seconds= {30} minutes={0} resend={this.handleClick} />
      </div>
    )
  }
}


User Guide?

Functionality:

Prop nameDescriptionDefault ValueExample
secondsnumber of seconds for which timer must be set30seconds={20}
minutesnumber of minutes for which the timer must be set0minutes={1}
resendfunction that would get triggered on clicking the resend buttonn/aresend={function name}
textcontent that you want to put downTime Left :text="Time Left"
ButtonTextbutton contentResendButtonText="Resend"

Styling:

Prop nameDescriptionDefault ValueExample
textColordescribes the timer's text color"#000000"textColor={"#000000"}
buttonColordescribes the button's text color"#fff"buttonColor={"#fff"}
backgrounddescribe the background color of the button"#0033cc"background={"#0033cc"}

Keywords

FAQs

Last updated on 18 Apr 2020

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