Sankey Flow
Flows from several sources merge into one target block that reads 12.4k. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/sankey-flowUsage
// src/Root.tsx
import { Composition } from "remotion";
import { SankeyFlow } from "@/components/remocn/sankey-flow";
const SankeyFlowScene = () => (
<SankeyFlow
target="remocn"
label="videos rendered"
sources={[
{ label: "Marketing", value: 4100 },
{ label: "Product", value: 3200 },
{ label: "Docs", value: 2400 },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="SankeyFlow"
component={SankeyFlowScene}
durationInFrames={140}
fps={30}
width={1280}
height={720}
/>
);Source nodes appear on the left, then flows of different widths draw one by one into a single target block that lands with the combined total and label. Pass sources (label and value), target, and label; the total is the sum unless you set total. Ships dark and light via theme.
Props16
| Prop | Type | Default |
|---|---|---|
| sources | SankeySource[]DEFAULT_SOURCES Source nodes on the left, each with a label and value. | |
| target | string"remocn" Name on the merged target block. | |
| total | number— Number shown on the target; defaults to the sum of sources. | |
| label | string"videos rendered" Caption under the total. | |
| stagger | number6 Frames between flows starting. | |
| flowLength | number34 Frames for one flow to reach the target. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| 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"Geist" Typeface for the copy. Load the font in your project first. | |
| 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. | |
- sourcesSankeySource[]
Source nodes on the left, each with a label and value.
Default
DEFAULT_SOURCES - targetstring
Name on the merged target block.
Default
"remocn" - totalnumber
Number shown on the target; defaults to the sum of sources.
- labelstring
Caption under the total.
Default
"videos rendered" - staggernumber
Frames between flows starting.
Default
6 - flowLengthnumber
Frames for one flow to reach the target.
Default
34 - logoReact.ReactNode
Replaces the remocn mark.
- 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
"Geist" - 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