Number Flow

Details about Number Flow

▶️ Key Features
  • Free, open-source animated number component

  • Built for React, Vue, Svelte, and vanilla JS/TS

  • Dependency-free, accessible, and customizable

  • MIT-licensed with 6.3k GitHub stars, deployable on Vercel

  • Supports currency, percentage, and compact formats

#What is NumberFlow?

NumberFlow, is an open-source animated number component created by Maxwell Barvian (@MBarvian) for React, Vue, Svelte, and vanilla JavaScript/TypeScript. Built on Intl.NumberFormat and Web Animations API, it provides smooth, dependency-free transitions for numbers, ideal for counters, prices, or stats. With 6.3k GitHub stars and 123 forks, it’s praised for its Apple-like smoothness (inspired by the Family iOS app) and used by platforms like X and Dub.co. NumberFlow is MIT-licensed, actively maintained (latest release v0.5.9, April 2025), and deployable on Vercel, offering formatting for currencies, percentages, and compact notations.

#Features ⚡️

  • Smooth Animations: Digit spin, fade, and transform effects for number transitions.

  • Formatting Options: Supports currency (e.g., USD), percentages, and compact notation via Intl.NumberFormat.

  • Locale Support: Localizes numbers for various languages (e.g., en-US, ja-JP), though non-Latin digits may error.

  • Customizable: Adjust animation timing, prefixes/suffixes, and CSS properties like mask height.

  • Accessibility: Respects prefers-reduced-motion and ensures screen-reader compatibility.

  • NumberFlowGroup: Syncs multiple NumberFlow instances for layout consistency.

  • Plugins: Continuous plugin for fluid in-between number transitions.

#Pros and Cons

#Pros ✅

  • Dependency-Free: Lightweight (~6.8kB gzipped for Svelte) with no external libraries.

  • Cross-Framework: Supports React, Vue, Svelte, and vanilla JS, plus a SolidJS fork.

  • Highly Customizable: Extensive props for animation, formatting, and styling.

  • Active Community: 6.3k stars, featured on X, Reddit, and Bytes.dev, with real-world use by X.

  • Accessible: Built-in support for reduced motion and ARIA compliance.

#Cons ⚠️

  • Non-Latin Digit Issues: Errors with locales like fa-IR or ar-OM using non-English numbers.

  • RTL Limitations: Right-to-left locales not fully supported.

  • Complex Styling: Changing font-size for digits is tricky due to CSS techniques.

  • Browser Compatibility: CSS mod() may cause fallback on older browsers; Safari fixes ongoing.

  • Bloat Concerns: Some users note ~47kB unminified JS is heavy for a visual effect.

#Included Components - Templates

  • NumberFlow Component: Core component for animating numbers with props for value, format, and timing.

  • NumberFlowGroup: Wrapper to sync multiple NumberFlow instances for layout animations.

  • Continuous Plugin: Enables fluid transitions through in-between numbers.

  • Example Templates: Social media stats (likes, views), price tags with currency, sliders, and counters.

  • Vanilla JS Custom Element: <number-flow> for framework-free use with .update() method.

#Pricing 💸

NumberFlow operates on a Free model:

  • Free Access: All features, including animations and formatting, are free under the MIT license.

  • No premium version or paid features offered.

#Integrations 🧰

  • React: Primary framework with @number-flow/react.

  • Vue: Supported via @number-flow/vue.

  • Svelte: Compatible with Svelte 4 & 5 via @number-flow/svelte.

  • Vanilla JS/TS: Custom element <number-flow> for framework-free use.

  • Intl.NumberFormat: Handles number localization and formatting.

  • Web Animations API: Powers smooth, native animations.

  • Vercel: Deployment platform for demos and hosting.

#Conclusion:

NumberFlow is a polished, dependency-free solution for animating numbers, offering Apple-like smoothness across React, Vue, Svelte, and vanilla JS. Its accessibility, customization, and active community (6.3k stars, used by X) make it ideal for dynamic UI elements, though non-Latin digit issues and styling limitations need attention.

Frequently Asked Questions

What is NumberFlow, and what does it do?

NumberFlow is a free, open-source component for animating number transitions in React, Vue, Svelte, and vanilla JS, with formatting and localization.

Is NumberFlow free to use?

Yes, it’s fully free under the MIT license.

Have a product?

Submit your Shadcn product to AllShadcn, get featured, and drive genuine traffic while showcasing your work to the world. Turn your creativity into revenue and begin selling today! 🚀

Submit Product