Distribution Shift
A latency distribution curve collapses left while 120ms and -86% appear. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/distribution-shiftUsage
// src/Root.tsx
import { Composition } from "remotion";
import { DistributionShift } from "@/components/remocn/distribution-shift";
const DistributionShiftScene = () => (
<DistributionShift before={840} after={120} unit="ms" label="p99 latency" />
);
export const RemotionRoot = () => (
<Composition
id="DistributionShift"
component={DistributionShiftScene}
durationInFrames={340}
fps={60}
width={1280}
height={720}
/>
);A bell-shaped latency curve rises with a marker at its slow tail, then morphs left and tightens as the marker slides to the new value and the percent change appears. Pass before and after in the same unit, plus a label for the metric. Ships dark and light via theme.
Props15
| Prop | Type | Default |
|---|---|---|
| before | number840 Starting value, such as p99 latency. | |
| after | number120 Final value after the improvement. | |
| unit | string"ms" Unit appended to the values. | |
| label | string"p99 latency" Name of the measured metric. | |
| fromLabel | string"from" Word before the old value under the readout. | |
| accent | string"#3B5BFD" Accent color for the hero element. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Space Grotesk" Typeface for the copy. Load the font in your project first. | |
| shiftDuration | number52 Frames the curve takes to morph from the old value to the new one. | |
| 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. | |
| grain | booleantrue Film grain over the scene. | |
| theme | "dark" | "light""dark" Dark or light palette. | |
| speed | number1 Playback multiplier. | |
- beforenumber
Starting value, such as p99 latency.
Default
840 - afternumber
Final value after the improvement.
Default
120 - unitstring
Unit appended to the values.
Default
"ms" - labelstring
Name of the measured metric.
Default
"p99 latency" - fromLabelstring
Word before the old value under the readout.
Default
"from" - accentstring
Accent color for the hero element.
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
"Space Grotesk" - shiftDurationnumber
Frames the curve takes to morph from the old value to the new one.
Default
52 - 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 - grainboolean
Film grain over the scene.
Default
true - theme"dark" | "light"
Dark or light palette.
Default
"dark" - speednumber
Playback multiplier.
Default
1