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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stephanluis/react-countdown-editable

v0.1.4

Published

Editable React countdown using input-duration and react-countdown.

Readme

Editable React-Countdown

An independent integration of @stephanluis/react-input-duration and react-countdown. The editable duration control shows the remaining time while counting down. Applications provide their own controls.

Try the live demo

Editable React countdown demo

Installation

npm install @stephanluis/react-countdown-editable

React 18.2 or 19 and React DOM are required.

Usage

import { useRef, useState } from 'react';
import EditableCountdown from '@stephanluis/react-countdown-editable';

function TimerExample() {
    const timer = useRef(null);
    const [running, setRunning] = useState(false);
    const [status, setStatus] = useState('Ready.');

    function start() {
        try {
            timer.current.start();
        } catch (error) {
            setStatus(error.message);
        }
    }

    return <>
        <EditableCountdown ref={timer} initialValue="0:00:00:10.000"
            onStart={() => { setRunning(true); setStatus('Countdown running.'); }}
            onStop={() => { setRunning(false); setStatus('Countdown stopped.'); }}
            onComplete={() => { setRunning(false); setStatus('Countdown complete.'); }} />
        <button type="button" onClick={running ? () => timer.current.stop() : start}>
            {running ? 'Stop' : 'Start'}
        </button>
        <p role="status">{status}</p>
    </>;
}

initialValue accepts HH:mm:ss.SSS or D:HH:mm:ss.SSS; it is used only on mount. Call start() on the ref to use the last committed duration; it throws if the input is not ready, invalid, zero, or outside JavaScript's safe integer and date ranges. Call stop() to preserve the remaining duration for editing. Each method returns true when it acts and false if the timer is already in that state. onStart, onStop, and onComplete are React callbacks; if stop() is called after the deadline, onComplete is called instead of onStop.

The input is disabled while running and re-enabled on stop or completion. This project is not affiliated with or endorsed by react-countdown.

Local demo

Run npm install, then npm run demo, and open the URL printed by Vite. Run npm test to check the integration and its TypeScript declarations.

After GitHub Pages is enabled with GitHub Actions as its source, the Pages workflow deploys the demo to GitHub Pages on pushes to main.