Charts guide
Sankey
Nodes and weighted links drawn as a flow diagram.
Install
npx shadcn@latest add @foldcn/sankeySankey parameters
| Parameter | Type / props | Behavior |
|---|---|---|
data | { nodes: { name }[]; links: { source, target, value }[] } | Flow graph indexed by node position. |
width / height | number | SVG dimensions. |
responsive | boolean | Fits the SVG to the available width. |
title / className | string | Accessible SVG label and wrapper class. |
Supports layered nodes and weighted flow links for small acyclic graphs. Full Sankey layout, node/link customization, and interactions remain open.
Examples
The first example is open. Expand Source inside an example to view its code. Other examples load when opened.