NumberFlow (React)

An animated number component for React that transitions digits, formats locales, and respects reduced-motion preferences

Library
npm
v0.6.2
7,642stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity80
Maintenance100
Community48
Maturity44
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture85
Code Quality82
Innovation83
Learning Curve78

NumberFlow is a React component that animates transitions between numeric values, spinning individual digits in and out and re-flowing grouping/decimal characters the way an odometer would. Under the hood it wraps a framework-agnostic custom element (number-flow-lite) so the same core rendering and diffing logic is shared across the project’s React, Vue, and Svelte packages. It formats numbers with Intl.NumberFormat, so locale, currency, percentage, and compact-notation formatting all work out of the box while the animation layer only replays the parts of the number that actually changed.

Beyond the basic value transition, NumberFlow ships a NumberFlowGroup for synchronizing multiple counters that update together (e.g. a price and its per-unit breakdown), continuous/trend plugins for stock-ticker-style motion, and first-class SSR support so the initial render is not blank before hydration. It automatically respects prefers-reduced-motion and falls back to a plain text swap when the browser can’t animate, making it a practical fit for dashboards, pricing pages, and any UI element that needs to draw attention to a changing count without feeling gimmicky.

What You Get

  • A drop-in <NumberFlow value={...} /> component that animates between any two numbers using Intl.NumberFormat options for locale, currency, and precision
  • A NumberFlowGroup component for keeping multiple related counters visually synchronized during simultaneous updates
  • Built-in respect for prefers-reduced-motion, with automatic fallback to non-animated rendering
  • SSR-safe rendering via a shared custom-element core so the first paint already shows the correct formatted number
  • Plugins (e.g. continuous/trend) for stock-ticker-like motion and directional animation cues
  • Framework parity — the same core engine also powers @number-flow/vue and @number-flow/svelte packages in the same monorepo

Common Use Cases

  • Animating price or total changes in checkout and cart summaries
  • Live-updating dashboard KPIs, stats, and counters
  • Stock ticker or crypto price displays with trend-aware motion
  • Gamified UI elements like scores, streaks, or leaderboard positions

Under The Hood

Architecture - The monorepo (packages/number-flow, packages/react, packages/vue, packages/svelte) centers on a framework-agnostic custom element defined in number-flow/lite, which handles formatting a value into structured Data (via formatToData) and diffing/animating the DOM between renders. @number-flow/react’s NumberFlow.tsx registers a NumberFlowElement custom element subclass once, then wraps it in a class component (NumberFlowImpl) that uses getSnapshotBeforeUpdate/componentDidUpdate to call willUpdate()/didUpdate() around the custom element exactly when data changes, letting the underlying element manage the actual digit transition animations. A NumberFlowGroup context coordinates multiple instances so simultaneous updates animate in lockstep.

Tech Stack - Pure TypeScript, built with tsup and a pnpm workspace (pnpm-workspace.yaml). React support spans React 16-19 with explicit shims (isReact19 branches) to handle differences in custom-element attribute handling and JSON serialization of props between versions. The core relies on the standard Intl.NumberFormat API for locale/currency formatting rather than a bundled formatting library, keeping the dependency footprint minimal (only esm-env for browser detection).

Code Quality - The test-suites/wrapper directory contains a substantial Vitest suite (render, SSR, update, animated, group, nonce, hashes, can-animate) with snapshot fixtures per test, covering cross-framework behavior consistently. Code is compact and heavily commented at tricky workaround points (e.g. React 19 attribute-changed-callback differences), which aids maintainability given the DOM/React interop complexity involved.

API Design - The public API is intentionally small: a single <NumberFlow value={...} /> component with optional locales/format props mirroring Intl.NumberFormatOptions, plus a NumberFlowGroup wrapper for coordinated groups. Because formatting options map directly onto the standard Intl API, there is no bespoke format mini-language to learn, and the component works as a near drop-in replacement for a plain {value} render, keeping the barrier to adoption low.

Used by 14 apps in this directory

Rust
64%
Apache 2.0

agentgateway

AI Development · Developer Tools

4,420

An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.

View details
88
Repo Health
82
Technical
72
Dependency
Built with
Rust64%
Go24%
Updated yesterday
TypeScript
89%
Other

anytype-ts

Knowledge Management · Note Taking · Collaboration

8,665

A local-first, end-to-end encrypted knowledge OS that lets you build notes, tasks, wikis, and entire apps — with your data stored offline and synced peer-to-peer.

View details
88
Repo Health
78
Technical
67
Dependency
Built with
TypeScript89%
Updated yesterday
Python
68%
Other

AutoGPT

Automation · Productivity · AI Assistants

186,687

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
67
Dependency
Built with
Python68%
TypeScript31%
Updated today
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
TypeScript
100%
Other

Dub

Marketing · Analytics

24,521

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
81
Repo Health
78
Technical
65
Dependency
Built with
TypeScript100%
Updated today
JavaScript
51%
MIT

Ghost

CMS · Blogging

54,795

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
69
Dependency
Built with
JavaScript51%
TypeScript43%
Updated today
TypeScript
96%
AGPL 3.0

Midday

Invoicing Finance · Productivity

14,770

All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.

View details
56
Repo Health
78
Technical
72
Dependency
Built with
TypeScript96%
Updated 2 months ago
Go
54%
Other

Multica

AI Assistants · AI Development

46,769

Turn coding agents into real teammates — assign issues, track progress, and compound reusable skills across a vendor-neutral, self-hosted platform.

View details
86
Repo Health
83
Technical
70
Dependency
Built with
Go54%
TypeScript41%
Updated today
TypeScript
98%
Other

Novu

Developer Tools

39,615

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
65
Dependency
Built with
TypeScript98%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search