Streamgraph
Flowing stacked layers draw across the frame and settle into a 48% share. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/streamgraphUsage
// src/Root.tsx
import { Composition } from "remotion";
import { Streamgraph } from "@/components/remocn/streamgraph";
const StreamgraphScene = () => (
<Streamgraph
highlight={2}
label="of new projects"
series={[
{ label: "Kitebase", values: [12, 14, 17, 19, 18, 16, 15, 13] },
{ label: "Lumen", values: [9, 10, 12, 14, 15, 13, 11, 9] },
{ label: "remocn", values: [2, 3, 5, 9, 13, 19, 25, 33] },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="Streamgraph"
component={StreamgraphScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);Stacked layers draw from left to right as a flowing stream, then the highlighted layer takes the gradient while the others dim, and its share counts up with a label. Pass series (label and one value per time step), highlight and label. Ships dark and light via theme.
Props15
| Prop | Type | Default |
|---|---|---|
| series | StreamSeries[]DEFAULT_SERIES Layers of the stream, each with one value per time step. | |
| highlight | number2 Index of the layer that gets the gradient. | |
| label | string"of new projects" Line under the final share. | |
| landAt | number82 Frame the stream finishes growing and the share lands. | |
| dim | number0.38 How far the other layers fade when the share lands, from 0 to 1. | |
| 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"Bricolage Grotesque" Typeface for the copy. Load the font in your project first. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| 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" Dark or light palette. | |
| speed | number1 Playback multiplier. | |
- seriesStreamSeries[]
Layers of the stream, each with one value per time step.
Default
DEFAULT_SERIES - highlightnumber
Index of the layer that gets the gradient.
Default
2 - labelstring
Line under the final share.
Default
"of new projects" - landAtnumber
Frame the stream finishes growing and the share lands.
Default
82 - dimnumber
How far the other layers fade when the share lands, from 0 to 1.
Default
0.38 - 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
"Bricolage Grotesque" - logoReact.ReactNode
Replaces the remocn mark.
- 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"
Dark or light palette.
Default
"dark" - speednumber
Playback multiplier.
Default
1