# NumberFlow

> Animated number component: digits roll to the new value, formatted with Intl.NumberFormat.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/number-flow

free

Animated number component: digits roll to the new value, formatted with Intl.NumberFormat.

by Maxwell Barvian[GitHub](https://github.com/barvian/number-flow)[npm](https://npmjs.com/package/@number-flow/react)

[visit](https://number-flow.barvian.me/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://number-flow.barvian.me](https://number-flow.barvian.me/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

no preview

### [Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)

Animated text morphing: labels change letter by letter instead of swapping.

no preview

### [GSAP SplitText](https://tastebase.ehsanulsiam.workers.dev/browse/gsap-splittext)

Splits text into lines, words and characters (with masks) for staggered reveal animations.

no preview

### [useScramble](https://tastebase.ehsanulsiam.workers.dev/browse/use-scramble)

1 KB React hook that scrambles text through random characters before settling (decrypt effect).

## Try it

## Looks that pick it

[Playfulfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/playful)[Claymorphismfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/claymorphism)[Tactile 3Dfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/tactile-3d)[Material Youfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/material-you)[Bento gridfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/bento-grid)[Fintechfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/fintech)[SaaS marketingfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/saas-marketing)[Memphisfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/memphis)[Kawaiifirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/kawaii)[Game UIfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/game-ui)[Minimal](https://tastebase.ehsanulsiam.workers.dev/looks/minimal)[Apple-like](https://tastebase.ehsanulsiam.workers.dev/looks/apple)[and 12 more](https://tastebase.ehsanulsiam.workers.dev/looks)

## For your agent

##### Install

`npm i @number-flow/react`

##### Use it for

- a pricing toggle where the price rolls between monthly and yearly
- a cart total, counter or quantity stepper
- live stats or KPIs that update in place on a dashboard
- a live price ticker (crypto, stocks) whose digits roll as each new price arrives

##### Skip it when

- a value redrawn every frame (stopwatches, 60fps counters): render plain tabular-nums text
- text labels: use torph
- a big one-off stat on a landing page that animates once, where formatting does not matter: motion's animate() on a value is enough

##### What's inside12 free

- NumberFlow
- NumberFlowGroup
- useCanAnimate
- continuous plugin
- format (Intl.NumberFormat)
- prefix / suffix
- Timings
- trend
- isolate
- digits
- Styling (CSS masks and parts)
- onAnimationsStart / onAnimationsFinish

##### Facts

**Frameworks**
react, vue, svelte, solid, angular, vanilla

**Styling**
unstyled

**Weight**
small

**Accessibility**
strong

**Maturity**
stable

**License**
MIT

**Price**
Free

##### Pairs with

[Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

##### Alternatives

[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

```
import NumberFlow from '@number-flow/react'

<NumberFlow value={price} format={{ style: 'currency', currency: 'USD', maximumFractionDigits: 0 }} />
```

https://number-flow.barvian.me/examples

Loading website

[Visit](https://number-flow.barvian.me/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
