Data · sankey-flow
Sankey flow
A Sankey diagram built from a list of weighted links: node bars grow column by column and curved ribbons, sized by value and coloured source-to-target, sweep across between them with labels and values; an optional highlighted node dims everything not connected to it.
A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Sankey flow is for
Where things go: traffic to conversions, budget to departments, energy or cash flows, funnels with leaks, user journeys. Pass links as [{from, to, value}], set prefix / suffix and brand colours; works on a transparent background over footage.
Details
- Category
- Animated charts & data visualisation
- Length
- 7.0 s (210 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- yes
- Seamless loop
- no
- Text props
titlesubtitleprefix- Colour props
colorsbackgroundink- Mood
- hud
- Roles
- accent, subject
Use Sankey flow in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add sankey-flow --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render sankey-flow --props '{"title":"Where visitors go","subtitle":"Monthly sessions from first touch to paying customer","prefix":"","colors":["#2F6FED","#FF7A45","#16B39A","#F2B134","#8E5CF0","#E5487F","#5BC0EB","#7A8794"],"background":"#F5F3EE","ink":"#18212B"}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export sankey-flow --as webm-alpha --props '{"title":"Where visitors go","subtitle":"Monthly sessions from first touch to paying customer","prefix":"","colors":["#2F6FED","#FF7A45","#16B39A","#F2B134","#8E5CF0","#E5487F","#5BC0EB","#7A8794"],"background":"#F5F3EE","ink":"#18212B"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="sankey-flow"
props={{
title: 'Where visitors go',
subtitle: 'Monthly sessions from first touch to paying customer',
prefix: '',
colors: [
'#2F6FED',
'#FF7A45',
'#16B39A',
'#F2B134',
'#8E5CF0',
'#E5487F',
'#5BC0EB',
'#7A8794',
],
background: '#F5F3EE',
ink: '#18212B',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="sankey-flow"
props='{"title":"Where visitors go","subtitle":"Monthly sessions from first touch to paying customer","prefix":"","colors":["#2F6FED","#FF7A45","#16B39A","#F2B134","#8E5CF0","#E5487F","#5BC0EB","#7A8794"],"background":"#F5F3EE","ink":"#18212B"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "sankey-flow",
"props": {
"title": "Where visitors go",
"subtitle": "Monthly sessions from first touch to paying customer",
"prefix": "",
"colors": [
"#2F6FED",
"#FF7A45",
"#16B39A",
"#F2B134",
"#8E5CF0",
"#E5487F",
"#5BC0EB",
"#7A8794"
],
"background": "#F5F3EE",
"ink": "#18212B"
}
}
]
}Sankey flow props
20 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
links | [{"from":"Organic","to":"Visitors","value":420},{"from":"Paid","to":"Visitors","value":… | weighted links [{from, to, value, color?}]; nodes are created from the names, columns follow the flow direction |
nodeColors | {"Visitors":"#8E5CF0","Bounced":"#9AA3AD","Inactive":"#B8BEC5","Paying":"#12A150","Chur… | optional node name -> colour overrides, e.g. {"Paid":"#E5487F"} |
title | "Where visitors go" | headline (empty = none) |
subtitle | "Monthly sessions from first touch to paying customer" | small line under the headline (empty = none) |
prefix | "" | text before every number, e.g. "$" |
suffix | "" | text after every number, e.g. "K", " users" |
decimals | 0 | decimal places on the numbers |
showValues | true | print each node total (tall nodes: under the name, short nodes: next to it) |
linkMode | "gradient" | ribbon colour: "gradient" (source to target), "source" or "target" |
linkOpacity | 0.5 | ribbon opacity 0-1 |
nodeWidth | 26 | node bar width in u |
nodePad | 22 | vertical gap between nodes of a column in u |
align | "left" | "justify" pushes end nodes to the last column, "left" keeps them where they land |
highlight | "" | node name to spotlight at the end (empty = none); unrelated nodes and links dim |
colors | ["#2F6FED","#FF7A45","#16B39A","#F2B134","#8E5CF0","#E5487F","#5BC0EB","#7A8794"] | palette used for nodes without an override |
background | "#F5F3EE" | page colour, or "transparent" to sit over other content |
ink | "#18212B" | text colour |
fontFamily | "" | CSS font family (empty = Space Grotesk) |
startAt | 8 | frame the first column appears |
speed | 1 | animation speed multiplier |
Related motions

Funnel conversion
Sales and signup funnels, hiring pipelines, checkout drop-off, content-to-lead stories, any "how many survive each step" breakdown.…
funnel-conversion
Treemap split
Part-to-whole with many items: portfolio or budget breakdowns, disk usage, market caps, revenue by product, survey categories, file sizes.…
treemap-split
Bar chart race
Rankings over time: market share by year, top products by quarter, followers by month, league tables, "who is winning" stories. Give the…
bar-race
Bubble scatter grow
Three-variable comparisons: markets by size, growth and margin, countries, products, campaigns, startups. Pass points as [{label, x, y,…
bubble-scatter-grow
Comparison dumbbell
Change between two states per item: before vs after, last year vs this year, plan vs actual, men vs women, A vs B, scores pre- and…
comparison-dumbbell
Donut breakdown
Share-of-total stories on any brand: revenue by channel, budget split, traffic sources, survey answers, market share. Replace data,…
donut-breakdown
Notes & credits
Technique sources:
- original round-3 chart motion