React diagram libraries

Updated Nov 2026

React diagram libraries render nodes and connecting edges as interactive diagrams that users can drag, connect, and edit. A diagram component either leaves node placement to the application or arranges nodes with an automatic layout engine such as ELK. These libraries let workflow builders, process editors, and AI agent tools show flows of steps that users can change.

Popularity

React Flow has the most monthly downloads in this comparison, at 80.1M.

LibraryMonthly downloadsStarsLast releaseLicense
React Flow
80.1M
39.1KNov 2026MIT
@ant-design/graphs
639.8K
2.2KAug 2025MIT
react-cytoscapejs
359.0K
534Sep 2022MIT
reaflow
153.1K
2.5KApr 2025Apache-2.0
@antv/x6-react-shape
115.7K
6.8KNov 2025MIT
@projectstorm/react-diagrams
108.7K
9.4KFeb 2024MIT
gojs-react
42.1K
251May 2025GoJS software license
@syncfusion/ej2-react-diagrams
31.4K
398Nov 2026Syncfusion commercial or Community license
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryAutomatic layoutUndo/redoOSI engine license
React FlowVia pluginUnsupportedBuilt-in
@ant-design/graphsBuilt-inBuilt-inBuilt-in
react-cytoscapejsBuilt-inVia pluginBuilt-in
reaflowBuilt-inBuilt-inBuilt-in
@antv/x6-react-shapeVia pluginBuilt-inBuilt-in
@projectstorm/react-diagramsBuilt-inUndocumentedBuilt-in
gojs-reactBuilt-inBuilt-inUnsupported
@syncfusion/ej2-react-diagramsBuilt-inBuilt-inUnsupported
Built-inVia pluginNot supportedNot documented

Libraries and code examples

Builds interactive node-based React interfaces with customizable nodes and edges.

Downloads / mo
80.1M
Stars
39.1K
Last release
13.0.2
License
MIT

Strengths

  • Combines editable nodes and edges. Connect nodes and update graph state through React hooks.
  • Includes viewport controls. Add the included MiniMap, Controls, and Background components.

Limitations

  • Automatic layout needs another library. Choose an external layout library to arrange nodes automatically.
  • Node maps need stable references. Define nodeTypes outside the component or memoize it.

Quickstart

From README.md
$ npm install @xyflow/react
import { ReactFlow } from '@xyflow/react';
import '@xyflow/react/dist/style.css';

const nodes = [{ id: '1', position: { x: 0, y: 0 }, data: { label: 'Node 1' } }];

export default function App() {
  return <div style={{ width: 600, height: 400 }}><ReactFlow defaultNodes={nodes} /></div>;
}

React Flow examples

From open-source projects on GitHub

@ant-design/graphs

Provides a React graph library based on Graphin.

Downloads / mo
639.8K
Stars
2.2K
Last release
2.1.1
License
MIT

Quickstart

From default.tsx
$ npm install @ant-design/graphs
import { FlowGraph, type FlowGraphOptions } from '@ant-design/graphs';
import React, { useEffect, useState } from 'react';

export default () => {
  const [data, setData] = useState(undefined);

  useEffect(() => {
    fetch('https://assets.antv.antgroup.com/g6/flow-analysis.json')
      .then((res) => res.json())
      .then(setData);
  }, []);

  const options: FlowGraphOptions = {
    autoFit: 'view',
    data,
    labelField: (d) => d.value.title,
  };

  return <FlowGraph {...options} />;
};

react-cytoscapejs

Renders network visualizations in React with Cytoscape.

Downloads / mo
359.0K
Stars
534
Last release
2.0.0
License
MIT

Quickstart

From README.md
$ npm install react-cytoscapejs cytoscape
import React from 'react';
import CytoscapeComponent from 'react-cytoscapejs';

const elements = [{ data: { id: 'one', label: 'Node 1' }, position: { x: 0, y: 0 } }];

export default function App() {
  return <CytoscapeComponent elements={elements} style={{ width: '600px', height: '600px' }} />;
}

Builds static and interactive React diagrams with automatic graph layout.

Downloads / mo
153.1K
Stars
2.5K
Last release
5.4.1
License
Apache-2.0

Strengths

  • Includes automatic graph layout. Arrange connected nodes using the included ELKJS integration.
  • Supports interactive port connections. Connect and rearrange nodes or ports through drag interactions.

Limitations

  • Layout configuration uses ELK options. Configure layoutOptions with ELK settings to customize graph arrangements.

Quickstart

From README.md
$ npm install reaflow
import React from 'react';
import { Canvas } from 'reaflow';

export default () => (
  <Canvas
    maxWidth={800}
    maxHeight={600}
    nodes={[
      {
        id: '1',
        text: '1'
      },
      {
        id: '2',
        text: '2'
      }
    ]}
    edges={[
      {
        id: '1-2',
        from: '1',
        to: '2'
      }
    ]}
  />
);

reaflow examples

From open-source projects on GitHub

@antv/x6-react-shape

Renders React components as X6 shapes.

Downloads / mo
115.7K
Stars
6.8K
Last release
3.0.1
License
MIT

Quickstart

From portal.tsx
$ npm install @antv/x6 @antv/x6-react-shape
import React, { useEffect, useRef } from 'react';
import { Graph } from '@antv/x6';
import { register, getProvider } from '@antv/x6-react-shape';

const Provider = getProvider();
const NodeComponent = () => <div>React node</div>;
register({ shape: 'algo-node-2', width: 144, height: 28, component: NodeComponent });

export default function App() {
  const ref = useRef<HTMLDivElement>(null);
  useEffect(() => {
    if (!ref.current) return;
    const graph = new Graph({ container: ref.current, width: 800, height: 600 });
    graph.addNode({ shape: 'algo-node-2', x: 80, y: 80 });
    return () => graph.dispose();
  }, []);
  return <><Provider /><div ref={ref} /></>;
}

@projectstorm/react-diagrams

Builds extensible flow and process diagrams with HTML-based nodes.

Downloads / mo
108.7K
Stars
9.4K
Last release
7.0.4
License
MIT

Strengths

  • Embeds rich HTML node controls. Build nodes containing inputs, dropdowns, and other interactive elements.
  • Extends the diagram model architecture. Customize models, factories, and widgets for application-specific elements.

Limitations

  • Specialized nodes need custom extensions. Create models, factories, and widgets beyond the provided defaults.

Quickstart

From using-the-library.md
$ npm install @projectstorm/react-diagrams @projectstorm/react-canvas-core
import createEngine, { DefaultNodeModel, DiagramModel } from '@projectstorm/react-diagrams';
import { CanvasWidget } from '@projectstorm/react-canvas-core';

const engine = createEngine();
const node = new DefaultNodeModel({ name: 'Node 1', color: 'rgb(0,192,255)' });
node.setPosition(100, 100);
const model = new DiagramModel();
model.addAll(node);
engine.setModel(model);

export default function App() {
  return <div style={{ width: 600, height: 400 }}><CanvasWidget engine={engine} /></div>;
}

@projectstorm/react-diagrams examples

From open-source projects on GitHub

gojs-react

Connects GoJS diagrams, palettes, and overviews to React applications.

Downloads / mo
42.1K
Stars
251
Last release
1.1.3
License
GoJS software license

Strengths

  • Wraps diagrams and companion views. Use ReactDiagram, ReactPalette, and ReactOverview with a GoJS model.
  • Reports transactional model changes. Update React state through onModelChange after completed GoJS transactions.

Limitations

  • Removed properties need explicit clearing. Set obsolete data properties to undefined instead of omitting them.
  • Organization use needs commercial licensing. GoJS treats use by or for an organization as commercial use.

Quickstart

From README.md
$ npm install gojs-react gojs
import * as go from 'gojs';
import { ReactDiagram } from 'gojs-react';

function initDiagram() {
  const $ = go.GraphObject.make;

  const diagram = $(go.Diagram,
    {
      'undoManager.isEnabled': true,  // must be set to allow for model change listening
      // 'undoManager.maxHistoryLength': 0,  // uncomment disable undo/redo functionality
      model: $(go.GraphLinksModel, {
        linkKeyProperty: 'key'  // this should always be set when using a GraphLinksModel
      })
    });

  diagram.nodeTemplate =
    $(go.Node, 'Auto',  // the Shape will go around the TextBlock
      $(go.Shape, 'RoundedRectangle', { strokeWidth: 0, fill: 'white' },
        // Shape.fill is bound to Node.data.color
        new go.Binding('fill', 'color')),
      $(go.TextBlock,
        { margin: 8 },  // some room around the text
        // TextBlock.text is bound to Node.data.key
        new go.Binding('text', 'key'))
    );

  return diagram;
}

export default function App() {
  return <ReactDiagram initDiagram={initDiagram} style={{ width: 600, height: 400 }}
    nodeDataArray={[{ key: 0, text: 'Alpha' }]} linkDataArray={[]} />;
}

@syncfusion/ej2-react-diagrams

Feature-rich diagram control to create diagrams like flow charts, organizational charts, mind maps, and BPMN diagrams. Its rich feature set includes built-in shapes, editing, serializing, exporting, printing, overview, data binding, and automatic layouts.

Downloads / mo
31.4K
Stars
398
Last release
35.2.12
License
Syncfusion commercial or Community license

Quickstart

From App.tsx
$ npm install @syncfusion/ej2-react-diagrams
import { DiagramComponent } from '@syncfusion/ej2-react-diagrams';
import './App.css';

function App() {
  return (
    <DiagramComponent
      id="diagram"
      width="100%"
      height="580px"
    />
  );
}

export default App;

FAQ

React Flow suits node-based editors with editable nodes, edges, and viewport controls. reaflow suits diagrams that need automatic graph layout. gojs-react suits diagrams with palettes and overviews under a commercial license for organizational use.

React Flow builds interactive node-based React interfaces with customizable nodes and edges. It includes MiniMap, Controls, and Background components.

No. React Flow needs an external layout library to arrange nodes automatically.

reaflow builds static and interactive React diagrams with automatic graph layout through ELKJS.

For coding agents

Found your diagram library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official