🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

nextjs-countdown-timer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-countdown-timer

Countdown to a time with a hook when the countdown timer reaches zero

1.2.1
latest
Source
npm
Version published
Weekly downloads
10
400%
Maintainers
1
Weekly downloads
 
Created
Source

✨ nextjs-countdown-timer

This is a react/nextjs-typescript project created by Abolade Greatness, helping you Countdown to a time with a hook when the countdown timer reaches zero.

🔧 Installation

npm i nextjs-countdown-timer

I'll provide support for other packages with time. Happy to collaborate with anyone. 🤝

😍 Features

  • Compatible with React.js and Next.js
  • Doesn't refresh on page reload
  • Customize hook when the countdown timer reaches zero
  • Easy to set up for real, you can make it work in less than 10sec!
  • Set custom duration with choice
  • Typescript supported

The gist

"use client";
import React from "react";
import { CountdownTimer } from "nextjs-countdown-timer";

const App: React.FC = () => {
	const handleTimerEnd = () => {
		console.log("Timer has ended!");
		// You can add your logic here when the timer reaches zero
	};

	return (
		<div>
			<h1>React Countdown Timer</h1>
			<CountdownTimer
				initialSeconds={60}
				onTimerEnd={handleTimerEnd}
			/>
		</div>
	);
};

export default App;

🤝 Contribute

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the contributing guide.

You can also find me on twitter and Linkedin. My pseudo is [thegrtnx].

🤐 License

Licensed under MIT

Keywords

countdown

FAQs

Package last updated on 29 Feb 2024

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