npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-countdown-minify

v1.0.2

Published

A simple React countdown component.

Readme

Countdown Timer

npm version npm downloads License

Overview

A customizable React countdown timer component that supports multiple time formats, allows users to define a callback when the countdown ends, and supports custom styling.

Installation

You can install the package using npm:

npm install react-countdown-timer-minify

Or install it locally from a .tgz file:

npm install ../react-countdown-timer-minify.tgz

Usage

Import and use the CountdownTimer component in your project:

import React from "react";
import CountdownTimer from "react-countdown-timer-minify";

const App = () => {
  return (
    <div>
      {/* Default Countdown Timer (Minutes input) */}
      <CountdownTimer duration={1920} />

      {/* Countdown Timer with Different Formats */}
      <CountdownTimer duration={1920} format="hh:mm:ss" />
      <CountdownTimer duration={1920} format="dd:hh:mm:ss" />
      <CountdownTimer duration={1920} format="ddd hh:mm" />
      <CountdownTimer duration={1920} format="ddd hh:mm:ss" />

      {/* Countdown Timer with Custom Styling */}
      <CountdownTimer
        duration={330}
        style={{ color: "red", fontSize: "24px", backgroundColor: "yellow" }}
      />

      {/* Countdown Timer with Callback on End */}
      <CountdownTimer duration={60} onEnd={() => alert("Time's up!")} />
    </div>
  );
};

export default App;

Customization:

  • Duration: Set the initial countdown time in minutes (default is 0).
  • Format: Choose a format for displaying the countdown (default is hh:mm:ss). Available options:
    • hh:mm:ss
    • hhh:mm:ss
    • dd:hh:mm:ss
    • mm:ss
    • mmm:ss
    • ddd hh:mm
    • ddd hh:mm:ss
  • On End Callback: Pass a function to execute when countdown reaches zero (default is an empty function () => {}).
  • Custom Styles: Pass custom CSS properties to style the countdown display.

Default Styling

The component comes with default styling:

.countdown-timer {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 5px;
  display: inline-block;
}

License

This project is licensed under the MIT License.