RemotionUI

Counter

Animated number with grouping, decimals, an odometer roll and a reserved width.

PrimitivePrimitives

counter30fps · 960×540
Install
$ npx remotion-ui@latest add counter

Ramps from from to to on an ease-out, so the number decelerates into its landing instead of arriving at constant speed.

The width is reserved from the longest value the ramp can produce, so a centred number never reflows the line around it. roll turns each digit like an odometer: the ones column spins continuously and every column above it waits for a carry.

The width is reserved from the longest value the ramp can produce, so a centred number never reflows the line around it.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/counter
  • Use when: data stories, metrics, charts, and numeric proof points.
  • Customize: to, from, durationInFrames, delayInFrames, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { Counter } from "@/remotion/primitives/counter"; <Counter from={0} to={124000} roll durationInFrames={64} />

API Reference

PropTypeDescription
to*numberValue the count lands on.
fromnumberValue the count starts from.
durationInFramesnumberFrames over which the value ramps.
delayInFramesnumberFrames before the ramp starts.
decimalsnumberFixed decimal places. Also fixes the width, so nothing shifts.
groupingbooleanGroup thousands with the locale's separator.
localestringLocale for grouping and decimal marks.
format(value: number) => stringFull override of the number formatting.
prefixstringText before the number, e.g. a currency mark.
suffixstringText after the number, e.g. %, K, M.
rollbooleanRoll each digit like an odometer. Lower digits spin continuously; higher ones turn over on the carry.
springMotionSpringDrive the ramp with a spring instead of the ease-out curve.
settlebooleanSmall scale pop on the frame the number lands.
fontSizenumberText size in pixels.
fontWeightnumberText weight.
colorstringText colour.
fontFamilystringFont family for the number.
styleCSSPropertiesStyles merged onto the number.

Related