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

sleepy-countdown

v0.1.0

Published

A configurable React countdown timer component with modern, classic, and minimal designs.

Readme

sleepy-countdown

A configurable React countdown timer component, with three pre-designed styles: modern, classic, and minimal.

Install

npm install sleepy-countdown

react and react-dom (v18+) are peer dependencies — your app provides them.

Usage

import { SleepyCountdown } from 'sleepy-countdown';

export function Example() {
  return (
    <SleepyCountdown
      target={new Date('2026-12-31T23:59:59')}
      type="modern"
      resolution="second"
      title="New Year"
      description="Counting down to 2027"
    />
  );
}

Styles are bundled into the component — no separate CSS import is required.

Props

| Prop | Type | Default | Description | | ------------- | ----------------------------------------- | ------------------------ | ----------------------------------------------------------- | | target | Date \| string \| number | (required) | When the countdown ends (Date, ISO string, or epoch-ms). | | resolution | 'day' \| 'hour' \| 'minute' \| 'second' | 'day' | Finest unit shown; finer units are hidden. | | end_message | ReactNode | 'Countdown has ended.' | Replaces the timer once target passes. | | title | ReactNode | — | Heading shown above the timer. | | description | ReactNode | — | Muted text shown below the title. | | type | 'modern' \| 'classic' \| 'minimal' | 'modern' | Pre-designed visual style. | | className | string | — | Extra class on the root element. | | style | CSSProperties | — | Inline styles / CSS-variable overrides on the root element. |

Theming

Colors and radii are CSS custom properties you can override from your own CSS or the style prop. Fonts are inherited from your app (the component sets none on its text). See docs/style_inheritence.md.

The component renders as a card with its own surface, border, and rounded corners. The default palette is Catppuccin Mocha; override any variable to switch flavors (or to your own brand). Common variables:

| Variable | Default (Catppuccin Mocha) | Controls | | ----------------------------------- | -------------------------- | ------------------------------------- | | --sleepy-countdown-surface | #1e1e2e | The card's background | | --sleepy-countdown-border | 1px solid #313244 | The card's border (full shorthand) | | --sleepy-countdown-surface-radius | 18px | The card's corner rounding | | --sleepy-countdown-shadow | soft dark drop shadow | The card's shadow | | --sleepy-countdown-accent | #cba6f7 (Mauve) | Accent color (modern digits) | | --sleepy-countdown-card-bg | #313244 (Surface0) | The individual time-unit cards | | --sleepy-countdown-card-fg | #cdd6f4 (Text) | Text on the time-unit cards (classic) | | --sleepy-countdown-fg | #cdd6f4 (Text) | Primary text color | | --sleepy-countdown-muted | #a6adc8 (Subtext0) | Muted text (description, labels) |

/* Example: override to Catppuccin Latte (the light flavor). */
.my-page .sleepy-countdown {
  --sleepy-countdown-surface: #eff1f5;
  --sleepy-countdown-border: 1px solid #ccd0da;
  --sleepy-countdown-card-bg: #ccd0da;
  --sleepy-countdown-accent: #8839ef;
  --sleepy-countdown-fg: #4c4f69;
  --sleepy-countdown-muted: #6c6f85;
}

Development

See docs/test_drive.md for running the live demo and tests.

License

MIT