# React diagram libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [React Flow](#react-flow) | 80.1M | 39.1K | Nov 2026 | MIT |
| [@ant-design/graphs](#ant-design-graphs) | 639.8K | 2.2K | Aug 2025 | MIT |
| [react-cytoscapejs](#react-cytoscapejs) | 359.0K | 534 | Sep 2022 | MIT |
| [reaflow](#reaflow) | 153.1K | 2.5K | Apr 2025 | Apache-2.0 |
| [@antv/x6-react-shape](#antv-xsix-react-shape) | 115.7K | 6.8K | Nov 2025 | MIT |
| [@projectstorm/react-diagrams](#projectstorm-react-diagrams) | 108.7K | 9.4K | Feb 2024 | MIT |
| [gojs-react](#gojs-react) | 42.1K | 251 | May 2025 | GoJS software license |
| [@syncfusion/ej2-react-diagrams](#syncfusion-ejtwo-react-diagrams) | 31.4K | 398 | Nov 2026 | Syncfusion commercial or Community license |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[React Flow](#react-flow) has the most monthly downloads in this comparison, at 80.1M.

## Capabilities

| Library | Automatic layout | Undo/redo | OSI engine license |
| --- | --- | --- | --- |
| [React Flow](#react-flow) | Via plugin | No | Yes |
| [@ant-design/graphs](#ant-design-graphs) | Yes | Yes | Yes |
| [react-cytoscapejs](#react-cytoscapejs) | Yes | Via plugin | Yes |
| [reaflow](#reaflow) | Yes | Yes | Yes |
| [@antv/x6-react-shape](#antv-xsix-react-shape) | Via plugin | Yes | Yes |
| [@projectstorm/react-diagrams](#projectstorm-react-diagrams) | Yes | Undocumented | Yes |
| [gojs-react](#gojs-react) | Yes | Yes | No |
| [@syncfusion/ej2-react-diagrams](#syncfusion-ejtwo-react-diagrams) | Yes | Yes | No |

## Libraries

### React Flow

[GitHub](https://github.com/xyflow/xyflow) · [npm](https://www.npmjs.com/package/@xyflow/react) · [Docs](https://reactflow.dev/)

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
- Capabilities: [From the React Flow docs](https://reactflow.dev/)

**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.

**Watch out for**

- **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.

```sh
npm install @xyflow/react
```

**langflow-ai/langflow** (156.7K stars)

[langflow-ai/langflow](https://github.com/langflow-ai/langflow) 

```tsx
const onEdgeUpdate = useCallback(
  (oldEdge: EdgeType, newConnection: Connection) => {
    if (isValidConnection(newConnection, nodes, edges)) {
      edgeUpdateSuccessful.current = true;
      oldEdge.data = {
        targetHandle: scapeJSONParse(newConnection.targetHandle!),
        sourceHandle: scapeJSONParse(newConnection.sourceHandle!),
      };
      setEdges((els) => reconnectEdge(oldEdge, newConnection, els));
    }
  },
  [setEdges],
);

```

[src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx](https://github.com/langflow-ai/langflow/blob/260cbf347cc5563cc48c79094c175ca31532ea2b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx#L826-L838) · [More projects using React Flow →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20importing%20%40xyflow/react%20for%20diagrams%2C%20workflow%20nodes%2C%20edges%2C%20ports%20and%20graph%20editing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
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>;
}

```

From [README.md](https://cdn.jsdelivr.net/npm/@xyflow/react@13.0.2/dist/index.d.ts)

### @ant-design/graphs

[GitHub](https://github.com/ant-design/ant-design-charts) · [npm](https://www.npmjs.com/package/@ant-design/graphs) · [Docs](https://ant-design-charts.antgroup.com/en/components/graphs/overview)

Provides a React graph library based on Graphin.

- Downloads / mo: 639.8K
- Stars: 2.2K
- Last release: 2.1.1
- License: MIT
- Capabilities: [From the @ant-design/graphs docs](https://ant-design-charts.antgroup.com/en/components/graphs/overview)

```sh
npm install @ant-design/graphs
```

**Quickstart**

```tsx
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} />;
};

```

From [default.tsx](https://github.com/ant-design/ant-design-charts/blob/master/site/docs/components/graphs-demos/flow-graph/default.tsx) · [Find projects using @ant-design/graphs →](https://dashboard.exa.ai/playground/search?q=%40ant-design/graphs%20GitHub%20projects)

### react-cytoscapejs

[GitHub](https://github.com/plotly/react-cytoscapejs) · [npm](https://www.npmjs.com/package/react-cytoscapejs)

Renders network visualizations in React with Cytoscape.

- Downloads / mo: 359.0K
- Stars: 534
- Last release: 2.0.0
- License: MIT
- Capabilities: [From the react-cytoscapejs docs](https://github.com/plotly/react-cytoscapejs)

```sh
npm install react-cytoscapejs cytoscape
```

**Quickstart**

```tsx
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' }} />;
}

```

From [README.md](https://github.com/plotly/react-cytoscapejs/blob/master/README.md) · [Find projects using react-cytoscapejs →](https://dashboard.exa.ai/playground/search?q=react-cytoscapejs%20GitHub%20projects)

### reaflow

[GitHub](https://github.com/reaviz/reaflow) · [npm](https://www.npmjs.com/package/reaflow) · [Docs](https://reaflow.dev/)

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
- Capabilities: [From the reaflow docs](https://reaflow.dev/)

**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.

**Watch out for**

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

```sh
npm install reaflow
```

**AykutSarac/jsoncrack.com** (44.6K stars)

[AykutSarac/jsoncrack.com](https://github.com/AykutSarac/jsoncrack.com) 

```tsx
const CustomNodeWrapper = (nodeProps: NodeProps<NodeData["data"]>) => {
  const data = nodeProps.properties.data;
  const setSelectedNode = useGraph(state => state.setSelectedNode);
  const setVisible = useModal(state => state.setVisible);

  const handleNodeClick = React.useCallback(
    (_: React.MouseEvent<SVGGElement, MouseEvent>, data: NodeData) => {
      if (setSelectedNode) setSelectedNode(data);
      setVisible("node")(true);
    },
    [setSelectedNode, setVisible]
  );

  return (
    <Node
      {...nodeProps}
      {...(data?.isEmpty && rootProps)}
      onClick={handleNodeClick as any}
      animated={false}
      label={null as any}
    >
      {({ node, x, y }) => {
        if (Array.isArray(nodeProps.properties.text)) {
          if (data?.isEmpty) return null;
          return <ObjectNode node={node as NodeData} x={x} y={y} />;
        }

        return <TextNode node={node as NodeData} hasCollapse={!!data?.childrenCount} x={x} y={y} />;
      }}
    </Node>
  );
};

```

[src/components/Graph/CustomNode/index.tsx](https://github.com/AykutSarac/jsoncrack.com/blob/844d6bdeb4d9360501cdf45dd2be637d5bb5979e/src/components/Graph/CustomNode/index.tsx#L26-L57) · [More projects using reaflow →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20importing%20reaflow%20for%20diagrams%2C%20workflow%20nodes%2C%20edges%2C%20ports%20and%20graph%20editing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
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'
      }
    ]}
  />
);

```

From [README.md](https://github.com/reaviz/reaflow/blob/master/README.md)

### @antv/x6-react-shape

[GitHub](https://github.com/antvis/X6) · [npm](https://www.npmjs.com/package/@antv/x6-react-shape) · [Docs](https://x6.antv.antgroup.com/)

Renders React components as X6 shapes.

- Downloads / mo: 115.7K
- Stars: 6.8K
- Last release: 3.0.1
- License: MIT
- Capabilities: [From the @antv/x6-react-shape docs](https://x6.antv.antgroup.com/)

```sh
npm install @antv/x6 @antv/x6-react-shape
```

**Quickstart**

```tsx
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} /></>;
}

```

From [portal.tsx](https://github.com/antvis/X6/blob/10ac74673a183143e842e42154e543532bfde0cf/examples/src/pages/react/portal.tsx) · [Find projects using @antv/x6-react-shape →](https://dashboard.exa.ai/playground/search?q=%40antv/x6-react-shape%20GitHub%20projects)

### @projectstorm/react-diagrams

[GitHub](https://github.com/projectstorm/react-diagrams) · [npm](https://www.npmjs.com/package/@projectstorm/react-diagrams) · [Docs](https://docs.projectstorm.io/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
- Capabilities: [From the @projectstorm/react-diagrams docs](https://docs.projectstorm.io/react-diagrams/)

**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.

**Watch out for**

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

```sh
npm install @projectstorm/react-diagrams @projectstorm/react-canvas-core
```

**Avaiga/taipy** (19.5K stars)

[Avaiga/taipy](https://github.com/Avaiga/taipy) 

```tsx
const NodeWidget = ({ node, engine }: NodeProps) => {
    const generatePort = useCallback(
        (port: DefaultPortModel) =>
            port.getName() == IN_PORT_NAME ? (
                <S.InPortLabel key="inlabel">
                    <PortWidget engine={engine} port={port} key={port.getID()}>
                        <Input />
                    </PortWidget>
                </S.InPortLabel>
            ) : (
                <S.OutPortLabel key="outlabel">
                    <PortWidget engine={engine} port={port} key={port.getID()}>
                        <Output />
                    </PortWidget>
                </S.OutPortLabel>
            ),
        [engine]
    );

    const onClick = useCallback(() => node.onClick && node.onClick(node.getID()), [node]);

    return (
        <S.Node
            data-default-node-name={node.getOptions().name}
            selected={node.isSelected()}
            background={node.getOptions().color}
            title={getStatusLabel(node.status)}
            $status={node.status}
            onClick={onClick}
        >
            <S.Title>
                <S.TitleIcon className="icon" title={node.getType()}>
                    {node.getType() == DataNode ? (
                        <DIcon />
                    ) : node.getType() == Task ? (
                        <TIcon />
                    ) : node.getType() == Sequence ? (
                        <PIcon />
                    ) : (
                        <SIcon />
                    )}
                </S.TitleIcon>
                <S.TitleName>
                    {node.getOptions().name}
                    {node.subtype ? <S.SubTitleName>{node.subtype}</S.SubTitleName> : null}
                </S.TitleName>
            </S.Title>
            <S.Ports>
                <S.PortsContainer>{node.getInPorts().map(generatePort)}</S.PortsContainer>
                <S.PortsContainer>{node.getOutPorts().map(generatePort)}</S.PortsContainer>
            </S.Ports>
        </S.Node>
    );
};

```

[frontend/taipy/src/projectstorm/NodeWidget.tsx](https://github.com/Avaiga/taipy/blob/5bcb5749521f9ddcc725c009aca00a88ff724e87/frontend/taipy/src/projectstorm/NodeWidget.tsx#L95-L148) · [More projects using @projectstorm/react-diagrams →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20importing%20%40projectstorm/react-diagrams%20for%20diagrams%2C%20workflow%20nodes%2C%20edges%2C%20ports%20and%20graph%20editing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
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>;
}

```

From [using-the-library.md](https://github.com/projectstorm/react-diagrams/blob/master/docs/getting-started/using-the-library.md)

### gojs-react

[GitHub](https://github.com/NorthwoodsSoftware/gojs-react) · [npm](https://www.npmjs.com/package/gojs-react) · [Docs](https://gojs.net/latest/intro/react.html)

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

- Downloads / mo: 42.1K
- Stars: 251
- Last release: 1.1.3
- License: GoJS software license
- Capabilities: [From the gojs-react docs](https://gojs.net/latest/intro/react.html)

**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.

**Watch out for**

- **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.

```sh
npm install gojs-react gojs
```

**Quickstart**

```tsx
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={[]} />;
}

```

From [README.md](https://github.com/NorthwoodsSoftware/gojs-react/blob/master/README.md) · [Find projects using gojs-react →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20importing%20gojs-react%20for%20diagrams%2C%20workflow%20nodes%2C%20edges%2C%20ports%20and%20graph%20editing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### @syncfusion/ej2-react-diagrams

[GitHub](https://github.com/syncfusion/ej2-react-ui-components) · [npm](https://www.npmjs.com/package/@syncfusion/ej2-react-diagrams) · [Docs](https://ej2.syncfusion.com/react/documentation/diagram/)

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
- Capabilities: [From the @syncfusion/ej2-react-diagrams docs](https://ej2.syncfusion.com/react/documentation/diagram/)

```sh
npm install @syncfusion/ej2-react-diagrams
```

**Quickstart**

```tsx
import { DiagramComponent } from '@syncfusion/ej2-react-diagrams';
import './App.css';

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

export default App;

```

From [App.tsx](https://ej2.syncfusion.com/react/documentation/diagram/getting-started) · [Find projects using @syncfusion/ej2-react-diagrams →](https://dashboard.exa.ai/playground/search?q=%40syncfusion/ej2-react-diagrams%20GitHub%20projects)

## FAQ

### Which React diagram library should I use?

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

### What is React Flow?

[React Flow](#react-flow) builds interactive node-based React interfaces with customizable nodes and edges. It includes MiniMap, Controls, and Background components.

### Does React Flow lay out nodes automatically?

No. [React Flow](#react-flow) needs an external layout library to arrange nodes automatically.

### What is reaflow?

[reaflow](#reaflow) builds static and interactive React diagrams with automatic graph layout through ELKJS.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React diagram libraries React Flow Reaflow ProjectStorm GoJS code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
