AI · MCP Server and Agent Skills included

React Sankey Diagram for flows, now easier to build with AI

Show how values flow between stages with nodes and links sized by value, horizontal or vertical layouts, labels, link colors, legends that highlight flows, tooltips, and print and export. AI assistants set it up for you from the current docs.

  • 4.5/5 850+ G2 reviews
  • 4.6/5 950+ Capterra reviews
  • WCAG 2.2 and Section 508
  • Horizontal and vertical
  • Legend flow highlighting

Trusted by the world’s leading companies

Syncfusion customers include Visa, Apple, McDonald’s, Netflix, Starbucks, IBM, Tesla, and Schneider Electric

Now easier with AI

Build Sankey diagrams faster with AI

Coding assistants write the Sankey setup from the current docs instead of guessing.

01For developers

Describe a flow and get code that uses the documented API

The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Sankey docs and recommended patterns.

See all 25 features

AI coding assistantMCP Server · Syncfusion React

Show energy flowing from solar and wind to electricity.

search_docs“React Sankey nodes and links” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent title="Energy flow">

<SankeyNodesCollectionDirective>

<SankeyNodeDirective id="Solar"

/><SankeyNodeDirective id="Wind" />

<SankeyNodeDirective id="Electricity" />

</SankeyNodesCollectionDirective>

<SankeyLinksCollectionDirective>

<SankeyLinkDirective sourceId="Solar"

targetId="Electricity" value={30} />

<SankeyLinkDirective sourceId="Wind"

targetId="Electricity" value={25} />

</SankeyLinksCollectionDirective>

</SankeyComponent>

Documented API: SankeyNodeDirective, SankeyLinkDirective, sourceId, targetId

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Draw the flow from top to bottom.

search_docs“React Sankey vertical orientation” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent orientation="Vertical">

<SankeyNodesCollectionDirective>…</SankeyNodesCollectionDirective>

</SankeyComponent>

Documented API: orientation

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Color each link like its source node and soften the curves.

search_docs“React Sankey link colors and curves” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent

linkStyle={{ colorType: 'Source', curvature: 0.5, opacity: 0.6 }}

nodeStyle={{ width: 20, opacity: 0.85 }} />

Documented API: linkStyle, colorType, nodeStyle

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Show node totals and link amounts in TBtu in the tooltip.

search_docs“React Sankey tooltip templates” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent tooltip={{ enable: true,

nodeTemplate: '${name}: ${value} TBtu',

linkTemplate:

'${start.name} → ${target.name}: ${target.in} TBtu'

}}>

<Inject services={[SankeyTooltip]} />

</SankeyComponent>

Documented API: tooltip, nodeTemplate, linkTemplate

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Add a legend at the bottom that highlights the flows of a node.

search_docs“React Sankey legend with flow highlighting” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent

legendSettings={{ visible: true, position: 'Bottom',

enableHighlight: true }}>

<Inject services={[SankeyLegend]} />

</SankeyComponent>

Documented API: legendSettings, enableHighlight, SankeyLegend

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Add buttons that export the diagram to PDF and print it.

search_docs“React Sankey print and export” · 2 doc sections

Excerpt: imports and sample data omitted.

const sankey = useRef<SankeyComponent>(null);

<SankeyComponent ref={sankey}>

<Inject services={[SankeyExport]} />

</SankeyComponent>

<button

onClick={() => sankey.current?.export('PDF', 'energy-flow')}>

Export PDF</button>

Documented API: export, print, SankeyExport

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

Make the node labels bold and show each node with its total, such as Solar 30.

search_docs“React Sankey node labels” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent

labelSettings={{ visible: true, fontWeight: '700' }}>

<SankeyNodesCollectionDirective>

<SankeyNodeDirective id="Solar"

label={{ text: 'Solar 30' }} />

</SankeyNodesCollectionDirective>

</SankeyComponent>

Documented API: labelSettings, label, text

ResultRendered in your app

AI coding assistantMCP Server · Syncfusion React

When users hover a flow, keep it bright and fade every other flow.

search_docs“React Sankey hover highlighting” · 2 doc sections

Excerpt: imports and sample data omitted.

<SankeyComponent

linkStyle={{ opacity: 0.35, highlightOpacity: 0.9,

inactiveOpacity: 0.1 }}>

<SankeyLinksCollectionDirective>…</SankeyLinksCollectionDirective>

</SankeyComponent>

Documented API: linkStyle, highlightOpacity, inactiveOpacity

ResultRendered in your app

Accessibility

Accessible to keyboard and screen reader users

The React Sankey component follows WAI-ARIA practices, with keyboard access and screen reader support.

Standards
WCAG 2.2 and Section 508
Keyboard
Arrow keys, Esc, Tab
Screen readers
aria-label and aria-pressed
Layout
Right-to-left and mobile support
Read the accessibility docs

Features in depth

React Sankey features in depth

Open a demo to try each one, or the docs to see the API.

Nodes and links sized by value

Define stages with SankeyNodeDirective and flows with SankeyLinkDirective, from sourceId to targetId. Link width shows the value, which suits energy distributions and process flows.

Horizontal or vertical orientation, and right to left

Set orientation to Horizontal, the default, or Vertical to fit the flow to your layout. enableRtl renders the text and layout from right to left.

Node and link appearance

nodeStyle sets node width, fill, stroke, and opacity. linkStyle colors links by source, target, or a blend of both, with its own curvature and opacity. The animation setting animates the diagram as it renders.

Node labels, titles, and subtitles

Labels annotate each node, and labelSettings styles their font, color, and padding. A title and subtitle describe the diagram and its source.

Tooltips for nodes and links

Tooltips show node and link values on hover. nodeFormat, linkFormat, and the template options change the text, and fade-out modes control how they disappear.

Legend with flow highlighting

The legend names each node. Hovering or clicking an item highlights the related links, and its position, shapes, and padding are adjustable.

Events for clicks, hover, and rendering

Handle nodeClick and linkClick, react when the pointer enters or leaves a node or link, and change nodes, links, and labels as they render.

Print and export to PDF or images

Inject SankeyExport to save the diagram as PDF, PNG, JPEG, or SVG on the client, or print it from the browser.

Accessible, responsive, and themed

Keyboard navigation and WAI-ARIA support follow WCAG 2.2 and Section 508 guidelines. The layout adapts to desktops and phones, with Tailwind CSS, Bootstrap, Material, Fluent, and Fabric themes.

Get started

Get your first Sankey chart running, with or without AI

With an AI coding assistant

  1. Connect the Syncfusion MCP serverWorks in VS Code, Cursor, JetBrains, and other MCP-compatible assistants.Set up the MCP server
  2. Add Agent Skills to your projectYour agent follows Syncfusion’s recommended Sankey patterns.Install Agent Skills
  3. Describe the Sankey chartCopy this prompt to start.

    Add a Syncfusion React Sankey chart to my energy report showing flows from solar, wind, gas, and coal to electricity and heat, and on to homes, industry, and transport.

By hand, in three steps

1 · Install

npm install @syncfusion/ej2-react-charts --save

2 · Theme

<SankeyComponent theme="Tailwind3" />

3 · src/App.tsx

import { SankeyComponent, SankeyNodesCollectionDirective, SankeyNodeDirective, SankeyLinksCollectionDirective, SankeyLinkDirective } from '@syncfusion/ej2-react-charts';

export default function App() {
  return (
    <SankeyComponent theme="Tailwind3">
      <SankeyNodesCollectionDirective>
        <SankeyNodeDirective id="Solar" />
        <SankeyNodeDirective id="Electricity" />
      </SankeyNodesCollectionDirective>
      <SankeyLinksCollectionDirective>
        <SankeyLinkDirective sourceId="Solar" targetId="Electricity" value={30} />
      </SankeyLinksCollectionDirective>
    </SankeyComponent>
  );
}
Read the getting started guide

Works withReact 15.5.4 or laterTypeScript and JavaScriptNext.jsRemixGatsbyVitePreactSystem requirements

Customer reviews

Trusted by developers and teams

G2

4.5/5

From 850+ reviews of Essential Studio®

Read the reviews on G2

“Awesome, enough said”

Easy usability, solving real-life problems, easy to implement. Most of the cases have the operators and settings possibilities you need right away.

Oliver O.Creative and Art Direction, Small Business

“A giant framework with great pricing options”

I have loved the components and options that Syncfusion has; besides, its documentation, demos, and support are excellent.

Alejandro Javier V.CEO, Small Business
75%
lower costs
50%
faster development

Customer story · Igniatek

Igniatek cuts development time 50% and costs 75% with Essential Studio®

“I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.”

Somnath Maji, Founder, Igniatek Consultancy

Award-winning

Including the 2026 Devies Award, Capterra Shortlist 2026, Software Advice FrontRunners 2026, and G2 Best Software 2025.

Syncfusion awards: 2026 Devies Award Winner, Capterra Shortlist 2026, Software Advice FrontRunners 2026, SaaS Awards 2026 Finalist, Hosting Advice Developers' Choice, A.I. Awards 2025 Finalist, Visual Studio Magazine Readers' Choice 2025 Gold, G2 Best Software 2025, ComponentSource Top 10 Publisher 2025, and TrustRadius Tech Cares 2025

Questions and answers

React Sankey FAQ

What is the React Sankey Diagram?

The Syncfusion React Sankey Diagram shows how a quantity moves between stages of a process. Nodes are the stages, and the width of each link shows the amount. Explore the demos

When should I use a Sankey diagram?

Use it to show transfers across stages, such as energy from sources to uses or users through a funnel, where the size of each flow matters. React Charts

How do I add a Sankey diagram in React?

Install @syncfusion/ej2-react-charts and render SankeyComponent with a SankeyNodeDirective for each stage and a SankeyLinkDirective for each flow. Read the getting started guide

How do I define nodes and links?

Give each node an id, and give each link a sourceId, a targetId, and a value. Read about links

Can the Sankey diagram flow from top to bottom?

Yes. Set orientation to Vertical; the default is horizontal. Vertical mode demo

How are link colors chosen?

Set linkStyle.colorType to Source, Target, or Blend, the default, which blends the colors of both nodes. Read about customization

Can I customize the tooltips?

Yes. Inject SankeyTooltip and set nodeFormat and linkFormat, or nodeTemplate and linkTemplate. Read about tooltips

Does the legend highlight flows?

Yes. Inject SankeyLegend and set legendSettings.enableHighlight to true. Hovering a legend item then highlights its links. Read about the legend

Can I respond to clicks on nodes and links?

Yes. Handle nodeClick and linkClick, or the enter and leave events, to show details or filter other views. Read about events

Can I export or print the Sankey diagram?

Yes. Inject SankeyExport to export PDF, PNG, JPEG, or SVG on the client, and call print to print it. Print and export demo

Is the React Sankey Diagram accessible?

Yes. Keyboard navigation and WAI-ARIA support follow WCAG 2.2 and Section 508 guidelines. Read about accessibility

Can AI coding assistants build with the React Sankey Diagram?

Yes. The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Sankey docs and recommended patterns. You need a Syncfusion API key and an active license, which can be a commercial, Community, or trial license. Set up the MCP server

Is the Syncfusion React Sankey Diagram free?

It is a commercial component with a 30-day free trial. A free Community License is available for companies and individuals with less than $1 million USD in annual gross revenue, five or fewer developers, and 10 or fewer total employees. Check Community License eligibility

Syncfusion React Sankey

Build your React Sankey diagrams faster with AI

The full Sankey Diagram, the MCP server, and Agent Skills, free for 30 days.

  • No credit card required
  • Free Community License for eligible teams
  • No runtime or deployment fees