Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

otp-timer

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

otp-timer

otp timer component

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by4.7%
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 18 Apr 2020

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc