Speed Trap
A speed readout locks on 348 km/h over a segmented bar with last year's marker and delta. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/speed-trapUsage
// src/Root.tsx
import { Composition } from "remotion";
import { SpeedTrap } from "@/components/remocn/speed-trap";
const SpeedTrapScene = () => (
<SpeedTrap
value={348}
previous={300}
unit="km/h"
banner="Top speed"
/>
);
export const RemotionRoot = () => (
<Composition
id="SpeedTrap"
component={SpeedTrapScene}
durationInFrames={230}
fps={60}
width={1280}
height={720}
/>
);A three-sector bar track snaps out and the readout floods up to the final value while a gradient bar races with it. On lock the number kicks, a banner wipes in, last year's mark drops onto the bar and the delta slice and comparison line appear. Pass value, previous, max and unit. It ships light and dark through the theme prop.
Props19
| Prop | Type | Default |
|---|---|---|
| value | number348 Speed the readout locks on. | |
| previous | number300 Last year's mark, drawn as a line on the bar. The delta is computed from it. | |
| max | number360 Full scale of the bar. | |
| unit | string"km/h" Unit after the number. | |
| banner | string"Top speed" Banner that flashes when the readout locks. | |
| previousLabel | string"2025" Label on the previous mark. | |
| comparison | string"vs last year" Text after the delta, e.g. "vs last year". | |
| label | string"Speed trap · Sector 3" Small label at the top left. | |
| lockAt | number42 Frame the readout locks on the value; the count runs up to it. | |
| sectors | number3 Number of sectors the bar is split into. | |
| accent | string"#3B5BFD" The live dot next to the label. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Sora" Typeface for the copy. Load the font in your project first. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| 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. | |
- valuenumber
Speed the readout locks on.
Default
348 - previousnumber
Last year's mark, drawn as a line on the bar. The delta is computed from it.
Default
300 - maxnumber
Full scale of the bar.
Default
360 - unitstring
Unit after the number.
Default
"km/h" - bannerstring
Banner that flashes when the readout locks.
Default
"Top speed" - previousLabelstring
Label on the previous mark.
Default
"2025" - comparisonstring
Text after the delta, e.g. "vs last year".
Default
"vs last year" - labelstring
Small label at the top left.
Default
"Speed trap · Sector 3" - lockAtnumber
Frame the readout locks on the value; the count runs up to it.
Default
42 - sectorsnumber
Number of sectors the bar is split into.
Default
3 - accentstring
The live dot next to the label.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Sora" - logoReact.ReactNode
Replaces the remocn mark.
- 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