Timer Duel
Two stopwatch timers run side by side, the faster one ending on 38x faster. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/timer-duelUsage
// src/Root.tsx
import { Composition } from "remotion";
import { TimerDuel } from "@/components/remocn/timer-duel";
const TimerDuelScene = () => (
<TimerDuel
before={2718.4}
after={70.9}
beforeLabel="Before"
afterLabel="With remocn"
/>
);
export const RemotionRoot = () => (
<Composition
id="TimerDuel"
component={TimerDuelScene}
durationInFrames={340}
fps={60}
width={1280}
height={720}
/>
);Two stopwatch readouts start together. The faster one stops first and lights up in the accent colour, then the slower one runs on, slows and freezes dimmed. The row rises and a large multiplier such as '38x faster' lands below it. Pass before and after in seconds, and beforeLabel and afterLabel to name the two clocks. It ships light and dark through the theme prop.
Props16
| Prop | Type | Default |
|---|---|---|
| before | number2718.4 Duration of the slower run, in seconds. | |
| after | number70.9 Duration of the faster run, in seconds. | |
| beforeLabel | string"Before" Label under the slower clock. | |
| afterLabel | string"With remocn" Label under the faster clock. | |
| delta | string— Text of the big result line. Defaults to the computed ratio, e.g. '38× faster'. | |
| fontFamily | string"Space Grotesk" Typeface for the copy. Load the font in your project first. | |
| run | number32 Frames the fast timer runs before it stops. | |
| chase | number50 Frames the slow timer takes to catch up after the fast one stops. | |
| accent | string"#3B5BFD" Colour of the faster clock once it stops. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| grain | booleantrue Film grain over the scene. | |
| 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. | |
| theme | "dark" | "light""dark" Ships light and dark. | |
| speed | number1 Playback speed multiplier; 1 is the designed pace. | |
- beforenumber
Duration of the slower run, in seconds.
Default
2718.4 - afternumber
Duration of the faster run, in seconds.
Default
70.9 - beforeLabelstring
Label under the slower clock.
Default
"Before" - afterLabelstring
Label under the faster clock.
Default
"With remocn" - deltastring
Text of the big result line. Defaults to the computed ratio, e.g. '38× faster'.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Space Grotesk" - runnumber
Frames the fast timer runs before it stops.
Default
32 - chasenumber
Frames the slow timer takes to catch up after the fast one stops.
Default
50 - accentstring
Colour of the faster clock once it stops.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- grainboolean
Film grain over the scene.
Default
true - 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 - theme"dark" | "light"
Ships light and dark.
Default
"dark" - speednumber
Playback speed multiplier; 1 is the designed pace.
Default
1