Special/NumberFlow

NumberFlow

Odometer-style rolling digit animation. Each digit is a vertical column of 0–9 that slides to the correct position using spring physics. The comma separators and prefix/suffix are static — only the actual digits animate.

import { NumberFlow } from "@animui/ui"

Counter

,

Pricing display

$.

/month

$.

/month

$.

/month

How it works

Each digit position renders a vertical strip containing all digits 0–9. A useSpring motion value drives the strip's translateY — when the digit changes, the spring smoothly scrolls the column to the new value. Only numeric characters animate; separators (commas, dots) and prefix/suffix are static spans.

Props

PropTypeDefaultDescription
valuenumberThe number to display. Changing this triggers the rolling animation.
prefixstring""Static text prepended (e.g. "$", "€").
suffixstring""Static text appended (e.g. "%", "px").
decimalsnumber0Number of decimal places to display.
classNamestringAdditional classes.
© 2026 Steal Shadow. MIT License.Report an issue