Sankey

Flow diagram — ranked nodes connected by throughput-sized link ribbons.

Category: chart · WCAG 2.1-AA · chart, sankey, flow, network, data-viz

Props

PropTypeDefaultDescription
nodesSankeyNode[]Nodes: { id, label, color? }.
linksSankeyLink[]Links: { source, target, value }.
titlestringTitle text for the component.
descriptionstringSupporting description text.
widthnumberFixed SVG width in px. ⚠ **Omit for a responsive chart** — the chart fills and tracks its container via a ResizeObserver; there is no correct pixel number in a responsive grid. A fixed width is clamped to the container (max-inline-size: 100%) so it can never overflow its card, but it also stops the chart growing. `useChartSize` is NOT needed for this — charts call it internally.
heightnumber320SVG height in px. Unlike `width`, height does NOT track the container — this is the knob you set to change the chart's aspect.
tooltipbooleanWhether to show tooltips on hover.
classNamestringAdditional CSS class names merged onto the root element.
plainbooleanfalseWhen true, renders a minimal variant without chart chrome.

Design tokens

When to use

When not to use

Examples

Sankey flow

import { Sankey } from '@cascivo/charts'

<Sankey
  title="Traffic flow"
  nodes={[{ id: 'a', label: 'Search' }, { id: 'b', label: 'Home' }, { id: 'c', label: 'Signup' }]}
  links={[{ source: 'a', target: 'b', value: 30 }, { source: 'b', target: 'c', value: 12 }]}
/>

Related components

← Back to docs