JSPM

nextjs-countdown-timer

1.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q55123F
  • License MIT

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

Package Exports

  • nextjs-countdown-timer
  • nextjs-countdown-timer/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nextjs-countdown-timer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

✨ 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