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

@pageblock/attributes-countdown

v0.1.8

Published

Create customizable countdown timers for Webflow with no-code.

Downloads

91

Readme

@pageblock/attributes-countdown

Create customizable countdown timers for Webflow with no-code.

Features

  • Multiple formats: Days, hours, minutes, seconds
  • Customizable display: Show/hide specific units, customize labels
  • Expiration handling: Custom actions when countdown reaches zero
  • Timezone support: Accurate across different timezones
  • Event callbacks: Hooks for tick and complete events
  • No dependencies: Pure JavaScript with no external libraries required

Installation

CDN (Recommended for Webflow)

<!-- Add to the <head> section -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@pageblock/attributes-countdown@latest/index.css">

<!-- Add before </body> -->
<script src="https://cdn.jsdelivr.net/npm/@pageblock/attributes-countdown@latest/index.js"></script>

NPM

npm install @pageblock/attributes-countdown
import { Countdown } from '@pageblock/attributes-countdown';
import '@pageblock/attributes-countdown/index.css';

Usage

Basic HTML Structure

<!-- Countdown Container -->
<div data-pb-countdown="2025-12-31T23:59:59">
  <!-- Days -->
  <div data-pb-countdown-unit="days">
    <span data-pb-countdown-value>00</span>
    <span data-pb-countdown-label>Days</span>
  </div>
  
  <!-- Hours -->
  <div data-pb-countdown-unit="hours">
    <span data-pb-countdown-value>00</span>
    <span data-pb-countdown-label>Hours</span>
  </div>
  
  <!-- Minutes -->
  <div data-pb-countdown-unit="minutes">
    <span data-pb-countdown-value>00</span>
    <span data-pb-countdown-label>Minutes</span>
  </div>
  
  <!-- Seconds -->
  <div data-pb-countdown-unit="seconds">
    <span data-pb-countdown-value>00</span>
    <span data-pb-countdown-label>Seconds</span>
  </div>
</div>

JavaScript API

// Initialize all countdowns on the page
PageBlockCountdown.init();

// Create a new countdown programmatically
PageBlockCountdown.create({
  target: document.querySelector('#my-countdown'),
  endDate: '2025-12-31T23:59:59',
  onTick: (remaining) => {
    console.log('Remaining time:', remaining);
  },
  onComplete: () => {
    console.log('Countdown completed!');
  }
});

Configuration Options

Data Attributes

  • data-pb-countdown: The end date in ISO format (e.g., "2025-12-31T23:59:59")
  • data-pb-countdown-unit: The unit type ("days", "hours", "minutes", "seconds")
  • data-pb-countdown-value: The element that will display the value
  • data-pb-countdown-label: The element that will display the label
  • data-pb-countdown-timezone: Optional timezone (e.g., "America/New_York")
  • data-pb-countdown-format: Optional format for the values (e.g., "00" for leading zeros)
  • data-pb-countdown-hide-zero: Optional attribute to hide units when they reach zero

Event Listeners

document.addEventListener('DOMContentLoaded', function() {
  document.querySelectorAll('[data-pb-countdown]').forEach(countdown => {
    countdown.addEventListener('countdown:tick', function(event) {
      console.log(`Countdown tick: ${event.detail.remaining}`);
      // Add your analytics code here
    });
    
    countdown.addEventListener('countdown:complete', function(event) {
      console.log(`Countdown completed!`);
      // Add your analytics code here
    });
  });
});

License

MIT