v0.1 public beta early access on GitHub
Home / Components / animated-number

Animated NumberiOS

Number that tweens between values with reduced-motion support.

$ npx lumioui add animated-number
import { AnimatedNumber } from "@/components/ui/animated-number/animated-number";
Animated Numberanimated-number.tsx
animated-number/animated-number.tsx open

Live preview — the real component, driven by the props below.

Props7
value number Target value.
from? number Value the first count starts from. Default 0.
duration? number Animation duration in ms. Default 1000. Ignored when `animation` is "spring".
animation? "ease" | "spring" Motion style — "ease" (default) counts up with the ease.out token over `duration` ms; "spring" eases in with the spring.roll token instead.
format? (n: number) => string Format the displayed number. Default rounds and locale-formats.
startOnView? boolean Wait until the number is visible before the first count. Default true.
className? string
Animated Number — Balancebalance.tsx
animated-number/variants/balance.tsx open

Number that tweens between values with reduced-motion support.

Animated Number — Statsstats.tsx
animated-number/variants/stats.tsx open

Number that tweens between values with reduced-motion support.