Stop paying for premium counters use this open source library instead
S

Stop paying for premium counters use this open source library instead

Stop paying for premium counters use this open source library instead

7,401 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Ditch the Premium Counters, Build Your Own with Number Flow

Ever needed a slick counter animation for a dashboard, a fundraising goal tracker, or just to make some stats on your site feel more alive? You probably looked around, found a few slick libraries, and then saw the price tag for the "premium" versions. It's a common itch for developers: you want a polished, professional effect without adding another subscription to the list.

What if you could just build it yourself, with full control and zero cost? That's the idea behind Number Flow, a lightweight, open-source library for creating smooth, customizable counting animations. It’s a straightforward solution to a specific problem, and it’s all yours for the price of an npm install.

What It Does

Number Flow is a zero-dependency JavaScript library that animates numbers. You give it a DOM element and a target number, and it smoothly transitions from a starting value (often zero) to that target. It handles formatting, easing curves, and timing, turning a static number into a dynamic, engaging element.

Why It’s Cool

The beauty of Number Flow is in its simplicity and focus. It doesn't try to be a full animation suite. It does one job and gets out of your way.

  • Tiny & Dependency-Free: It won't bloat your bundle. This makes it a perfect fit for lean projects or when you need just this one effect.
  • Dead Simple API: You can get a counter running with just a couple of lines of code. The configuration is intuitive, letting you set duration, easing functions, and number formatting without wrestling with a complex API.
  • Full Control: Because it's open source, you can fork it, tweak it, and adapt it to your exact needs. The easing function doesn't feel right for your use case? Change it. Need a specific formatting hook? Add it. You're not locked into a vendor's roadmap.
  • It Solves the Real Problem: Most of us don't need a massive animation library. We need a reliable, good-looking counter. Number Flow directly addresses that need without the overhead or cost of a more bloated "premium" alternative.

How to Try It

Getting started is as easy as it gets.

First, install it via npm:

npm install number-flow

Then, use it in your project. Here's the most basic example:

import NumberFlow from 'number-flow'; const element = document.getElementById('myCounter');
const counter = new NumberFlow(element, { value: 1000, // Your target number duration: 2000, // Animate over 2 seconds format: (value) => Math.floor(value).toLocaleString() // Format with commas
}); counter.start();

You can also use it directly from a CDN for quick prototyping. Check

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Jan 17, 2026