1.2.1 • Published 2 months ago

nextjs-countdown-timer v1.2.1

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

✨ 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

1.2.1

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago

1.0.0

2 months ago