Streamgraph
Flowing stacked layers draw across the frame and settle into a 48% share
$ 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={150}
fps={30}
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.
Props6
| 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. | |
| accent | string"#3B5BFD" Accent color for the hero element. | |
| 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" - accentstring
Accent color for the hero element.
Default
"#3B5BFD" - theme"dark" | "light"
Dark or light palette.
Default
"dark" - speednumber
Playback multiplier.
Default
1