Skip to content

Animated Number

DisplayWeb + NativeMIT
View in Storybook

Smooth animated number ticker — for stat counters and metric reveals.

bun add @otfdashkit/ui

Preview

Animated Number
Loading Storybook preview…

Code

import { AnimatedNumber } from '@otfdashkit/ui'

export function Example() {
  return <AnimatedNumber value={1234} />
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the AnimatedNumber source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
valuerequirednumberTarget value to animate to
autoStartbooleantrueWhether to start animating immediately or wait for intersection
decimalsnumber0Decimal places (default 0)
durationnumber1200Animation duration in ms (default 1200)
easing(t: number) => numberEasing function (default easeOutExpo)
formatbooleantrueFormat with locale grouping (e.g. 1,234)
fromnumber0Starting value (default 0)
localestringLocale for number formatting
prefixstring''Prefix string e.g. "$"
suffixstring''Suffix string e.g. "%" or "k"