Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsSep 11, 2026·2 min de lecture

Number Flow — Animated Number Transitions for React, Vue and Svelte

A multi-framework component that smoothly animates number changes with accessible, performant transitions.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Number Flow Overview
Commande d'installation directe
npx -y tokrepo@latest install 3d2c84ed-ada5-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Number Flow renders animated number transitions that feel native and performant. It supports React, Vue, and Svelte, making it a drop-in replacement for static number displays wherever you want smooth counting animations.

What Number Flow Does

  • Animates between numeric values with configurable easing and duration
  • Supports currency formatting, percentages, and custom number formats
  • Handles locale-aware number formatting via Intl.NumberFormat
  • Provides accessible output with ARIA attributes for screen readers
  • Works across React, Vue, Svelte, and vanilla TypeScript

Architecture Overview

Number Flow uses the Web Animations API under the hood, avoiding JavaScript-driven animation loops. Each digit is positioned independently and animated via CSS transforms, keeping the animation off the main thread. The component observes value changes and calculates the minimal set of digit transitions needed.

Self-Hosting & Configuration

  • Install the framework-specific package: @number-flow/react, @number-flow/vue, or @number-flow/svelte
  • Pass a numeric value prop and the component handles animation automatically
  • Configure format options using standard Intl.NumberFormat parameters
  • Adjust animation timing with the transformTiming and opacityTiming props
  • Use the willChange prop for GPU-accelerated rendering on mobile

Key Features

  • Per-digit animation that scrolls, fades, or slides each character independently
  • Built on Web Animations API for smooth 60fps transitions
  • Full Intl.NumberFormat support for currencies, units, and locale formatting
  • Accessible by default with live region updates for assistive technology
  • Tiny bundle size with no external animation library dependency

Comparison with Similar Tools

  • Framer Motion / Motion — general animation library; Number Flow is purpose-built for number transitions
  • CountUp.js — counts from zero to a target; Number Flow animates between any two values with digit-level control
  • react-spring — physics-based animations; Number Flow provides native-feeling number formatting without spring configs
  • Odometer — legacy number animation library; Number Flow is modern, framework-agnostic, and uses Web Animations API

FAQ

Q: Does Number Flow work with currencies? A: Yes. Pass Intl.NumberFormat options like style, currency, and locale.

Q: Can I animate non-numeric characters? A: Number Flow animates digits and formatting characters (commas, decimals, currency symbols) automatically.

Q: Is it accessible? A: Yes. It uses ARIA live regions so screen readers announce value changes.

Q: What browsers are supported? A: All modern browsers that support the Web Animations API.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires