Row Count
A big number rolls up across stacked ruled rows, adding a row at each thousands group. A free, MIT-licensed Remotion number animation.
In Remotion, Row Count rolls a number across ruled rows: a huge figure such as millions of frames counts up beside stacked ruled rows, and a new row springs in for each thousands group.
$ pnpm dlx shadcn@latest add @remocn/row-countHow to roll a huge number up across stacked rows in Remotion
A count into the millions that adds a ruled row for each thousands group is one component. You don't need to split digit groups and stack them with spring() and interpolate() yourself. Install it and pass the number:
npx shadcn@latest add @remocn/row-countvalueis where the count lands andfromwhere it starts; it climbs on a log curve.prefixadds a sign andlabelthe small label to the side.- Each thousands group gets its own row: a new row springs in as the count crosses 1,000, 1,000,000 and beyond, and the newest row is tinted in the
accentcolor. countLengthsets how long the climb takes.
For a small number that needs no stacked rows use Compact Stat.
Good to know
- Length: 84 frames of motion at 30 fps (168 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition with a hold, so itsdurationInFrames(260) is longer than twice the motion. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project; nothing else is needed at runtime. - Font: loads IBM Plex Sans itself through
@remotion/google-fonts, so the default needs no setup. PassfontFamilyto use your own face, and load that font in your project.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { RowCount } from "@/components/remocn/row-count";
const RowCountScene = () => <RowCount value={27300000} label="frames rendered in every region, every night" />;
export const RemotionRoot = () => (
<Composition
id="RowCount"
component={RowCountScene}
durationInFrames={260}
fps={60}
width={1280}
height={720}
/>
);The number counts up on a log curve beside a stack of ruled rows; each thousands group gets its own row, and a new row springs in as the count crosses 1,000, 1,000,000 and beyond, with the newest row tinted in the accent. A small label sits to the side. Pass value, from, prefix and label. It ships light and dark through theme.
Props13
| Prop | Type | Default |
|---|---|---|
| value | number27300000 The number the count lands on. | |
| from | number1 Starting number; the count climbs on a log curve. | |
| prefix | string"" Text before the number. | |
| label | string"frames rendered in every region, every night" Small label beside the stack. | |
| countLength | number78 Frames the count takes to reach the value. | |
| accent | string— Tint for the newest row; defaults to the theme accent. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Stage background color; overrides the theme ground. | |
| fontFamily | string"IBM Plex Sans" Typeface for the copy. The default loads itself; load any other font in your project first. | |
| scale | number1 Size of the foreground around the frame's center; the background stays put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback speed multiplier. | |
| theme | "dark" | "light""dark" Light or dark palette. | |
- valuenumber
The number the count lands on.
Default
27300000 - fromnumber
Starting number; the count climbs on a log curve.
Default
1 - prefixstring
Text before the number.
Default
"" - labelstring
Small label beside the stack.
Default
"frames rendered in every region, every night" - countLengthnumber
Frames the count takes to reach the value.
Default
78 - accentstring
Tint for the newest row; defaults to the theme accent.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Stage background color; overrides the theme ground.
- fontFamilystring
Typeface for the copy. The default loads itself; load any other font in your project first.
Default
"IBM Plex Sans" - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier.
Default
1 - theme"dark" | "light"
Light or dark palette.
Default
"dark"