RemotionUI

Counter

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

Primitive

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 lowest column turns continuously and every column above it holds its face until the ones below are nearly wrapped, then flips through on the carry. With decimals, the freely turning column is the last decimal place, not the units.

Every slot (a rolling digit, a group separator, the decimal point, a prefix or suffix) is a box exactly one digit tall with the glyph placed by half-leading, so all of them resolve to the same baseline at the same size, and each wheel is clipped to that one row. Nothing in the roll scales, fades or blurs, and turning roll on or off does not move the number or change the space it takes.

The width is reserved from the longest value the ramp can produce, so a centred number never reflows the line around it. Every rolling column shares one baseline and one size with the separators and is clipped to a single digit row, so nothing bleeds out of the number's line box.

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. The lowest column turns continuously and every column above it turns over on the carry. With decimals, the free column is the last decimal place.
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.

On this page