
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
otp-timer-ts
Advanced tools
@siamf/otp-timer
@siamf/otp-timer
instead.This package is no longer maintained. For the latest updates and improvements, migrate to:
A simple and customizable react otp timer component with typescript support. very simple and more customizable design and smallest bundle size about 13kb. You can use this component into any react and nextjs projects.
$ npm i otp-timer-ts --save
import { Otptimer } from "otp-timer-ts";
const Home = () => {
const handleResend = () => {
//desired function to be performed on clicking resend button
}
return (
<div>
<Otptimer minutes={0} seconds={5} onResend={handleResend} />
</div>
);
};
export default Home;
name | Description | Default Value |
---|---|---|
seconds | number of seconds for which timer must be set | 30 |
minutes | number of minutes for which the timer must be set | 0 |
onResend | function that would get triggered on clicking the resend button | n/a |
text | content that you want to put down | Resend otp in |
ButtonText | button text | Resend |
showSpinner | If you want to show any button loading | false |
fetching | If you want to show any button loading icon with fetching state | false |
spinnerComponent | Your custom spinner component for render | null |
Name | Type | Description |
---|---|---|
containerClass | string | timer Container class name |
textClass | string | text class name |
timerClass | string | timer class name |
buttonContainerClass | string | button container class |
buttonClass | string | button class |
buttonStyle | CSSProperties | styles for resend button |
buttonContainerStyle | CSSProperties | styles for resend button container |
textStyle | CSSProperties | styles for text |
timerStyle | CSSProperties | styles for timer |
textContainerStyle | CSSProperties | styles for timer text container |
You are welcome to create an issue.
otp-timer-ts is MIT licensed.
FAQs
A simple react otp timer component with resend functionality🤷
The npm package otp-timer-ts receives a total of 100 weekly downloads. As such, otp-timer-ts popularity was classified as not popular.
We found that otp-timer-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.