Charts guide

Sankey

Nodes and weighted links drawn as a flow diagram.

Install

npx shadcn@latest add @foldcn/sankey

Sankey parameters

ParameterType / propsBehavior
data{ nodes: { name }[]; links: { source, target, value }[] }Flow graph indexed by node position.
width / heightnumberSVG dimensions.
responsivebooleanFits the SVG to the available width.
title / classNamestringAccessible 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.

VisitsSignupsBouncedOrdersAbandoned