NumberFlow Grid Notes
Dependency-free animated number component for React, Vue and Svelte that rolls individual digits into place and formats values with `Intl.NumberFormat`.
Install and prerequisites
npm install @number-flow/react@number-flow/reactWorks with React 18 and 19. Uses CSS transforms and custom elements internally with zero external runtime dependencies.
Framework setup
Animated metric or price counter with Intl formatting
Pass numeric value and standard Intl.NumberFormatOptions in format; wrap related counters in <NumberFlowGroup> so adjacent layout shifts sync.
"use client";
import NumberFlow, { NumberFlowGroup } from "@number-flow/react";
export function PriceCounter({ amount, delta }: { amount: number; delta: number }) {
return (
<NumberFlowGroup>
<div className="flex items-baseline gap-2 tabular-nums">
<NumberFlow
value={amount}
format={{ style: "currency", currency: "USD", trailingZeroDisplay: "stripIfInteger" }}
className="text-2xl font-semibold"
/>
<NumberFlow
value={delta}
format={{ style: "percent", signDisplay: "always", maximumFractionDigits: 1 }}
className="text-sm"
/>
</div>
</NumberFlowGroup>
);
}Gotchas for agents
Never animate numbers the user is actively typing
Rolling digits on an input readout or live calculator while someone types introduces visual lag. Use
NumberFlowfor discrete state changes (billing period toggles, filter counts, dashboard ticks), not keystroke-by-keystroke field echoes.Unsupported Intl notations and scripts
Scientific and engineering notation (
notation: 'scientific' | 'engineering'), non-Latin numbering systems, and right-to-left (rtl) digit layouts are not supported; fall back to plainIntl.NumberFormatfor those locales.Keep tabular-nums on surrounding text
Set
tabular-nums(font-variant-numeric: tabular-nums) on the counter and its container so surrounding labels don't jitter horizontally while digits spin.
Accessibility and reduced motion
Reduced motion
respectMotionPreference is true by default: under prefers-reduced-motion: reduce, digit spin animations are skipped and values update immediately.
Keyboard and screen readers
NumberFlow renders an accessible text representation alongside the visual digit wheels so screen readers read the full formatted number rather than individual spinning digits.
More Grid Notes
- LenisLightweight smooth-scroll engine that keeps native browser scrolling, sticky positioning and intersection observers intact, and pairs cleanly with GSAP ScrollTrigger.
- GSAPTimeline, scroll-linked and text-splitting animation engine. All plugins — including ScrollTrigger, SplitText and MorphSVG — are included under Webflow's no-charge licence.
- MotionMIT-licensed animation library for React and JavaScript (formerly Framer Motion), offering a 3.3 kB `motion/mini` WAAPI build as well as layout, gesture and spring animations.
- dotLottieLottieFiles' WebAssembly-powered player for `.lottie` archives and Lottie JSON animations, with official wrappers for React, Vue, Svelte and plain web canvas.
- RiveInteractive state-machine graphics packaged in compact `.riv` files and driven at 60–120 fps by Rive's open-source WebGL2 and Canvas runtimes.
- Theatre.jsKeyframe timeline engine and visual studio overlay for choreographing Three.js / React Three Fiber cameras, lights and DOM properties.



