React graph visualization libraries

Updated Nov 2026

React graph visualization libraries draw networks of nodes and edges that users can explore. A renderer positions nodes with a layout algorithm, such as a force simulation, and draws the result on Canvas or WebGL. These libraries let knowledge graph tools, security dashboards, and AI agents show how entities connect.

Popularity

react-force-graph-2d has the most monthly downloads among the dedicated graph visualization libraries in this comparison, at 5.0M.

LibraryMonthly downloadsStarsLast releaseLicense
React Flow
80.1M
39.1KNov 2026MIT
react-force-graph-2d
5.0M
3.4KSep 2026MIT
@ant-design/graphs
639.8K
2.2KAug 2025MIT
Graphin
602.4K
1.1KApr 2025MIT
React Sigma
548.1K
240Oct 2026MIT
Reagraph
418.4K
1.1KJun 2026Apache-2.0
react-cytoscapejs
359.0K
534Sep 2022MIT
reaflow
153.1K
2.5KApr 2025Apache-2.0
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Builds node-based editors and interactive flow charts in React.

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

Quickstart

From index.d.ts
$ npm install react@^19 react-dom@^19 @xyflow/react@13.0.2
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

react-force-graph-2d

Displays force-directed network graphs using a two-dimensional Canvas renderer.

Downloads / mo
5.0M
Stars
3.4K
Last release
1.29.2
License
MIT

Strengths

  • Runs a force-directed layout. Position graph nodes with the included force simulation.
  • Customizes node painting. Draw custom nodes through the provided Canvas context.

Limitations

  • Directional layout requires acyclic data. Enable dagMode only for directed graphs without cycles.
  • Custom nodes need Canvas drawing. Use nodeCanvasObject to draw through the provided Canvas context.

Quickstart

From index-canvas.html
$ npm install react@^18.3 react-dom@^18.3 react-force-graph-2d@1.29.2
import ForceGraph2D from "react-force-graph-2d";

const graphData = {
  nodes: [{ id: "a" }, { id: "b" }],
  links: [{ source: "a", target: "b" }],
};

export default function App() {
  return <ForceGraph2D width={600} height={400} graphData={graphData} />;
}

react-force-graph-2d 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 index.d.ts
$ npm install react@^18.3 react-dom@^18.3 @ant-design/graphs@2.1.1
import { FlowGraph } from "@ant-design/graphs";

const data = {
  nodes: [{ id: "a" }, { id: "b" }],
  edges: [{ id: "a-b", source: "a", target: "b" }],
};

export default function App() {
  return (
    <div style={{ width: 600, height: 400 }}>
      <FlowGraph data={data} autoFit="view" />
    </div>
  );
}

Provides a React toolkit for graph analysis based on G6.

Downloads / mo
602.4K
Stars
1.1K
Last release
3.0.5
License
MIT

Quickstart

From types.d.ts
$ npm install react@^18.3 react-dom@^18.3 @antv/graphin@3.0.5
import { Graphin } from "@antv/graphin";

const data = {
  nodes: [{ id: "a" }, { id: "b" }],
  edges: [{ id: "a-b", source: "a", target: "b" }],
};

export default function App() {
  return <Graphin style={{ width: 600, height: 400 }} options={{ data, layout: { type: "grid" } }} />;
}

Graphin examples

From open-source projects on GitHub

Provides React graph containers, event hooks, and camera access for Sigma.

Downloads / mo
548.1K
Stars
240
Last release
6.0.0
License
MIT

Strengths

  • Manages graph event listeners. Register event handlers through useRegisterEvents with automatic removal.
  • Supports different graph models. Pass a Graphology constructor for the graph structure the application needs.

Limitations

  • New graph instances recreate Sigma. Keep graph references stable when updating React state.
  • Parallel edges need a multigraph. Use MultiDirectedGraph for multiple directed edges between the same two nodes.

Quickstart

From start-setup.md
$ npm install react@^18.3 react-dom@^18.3 @react-sigma/core@6.0.0 graphology@0.26.0 sigma@4.0.6
import Graph from "graphology";
import { SigmaContainer } from "@react-sigma/core";
import "@react-sigma/core/lib/style.css";

const graph = new Graph();
graph.addNode("a", { x: 0, y: 0, size: 10, label: "A" });
graph.addNode("b", { x: 1, y: 1, size: 10, label: "B" });
graph.addEdge("a", "b");

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

React Sigma examples

From open-source projects on GitHub

Renders interactive WebGL network graphs with included graph layouts.

Downloads / mo
418.4K
Stars
1.1K
Last release
4.32.0
License
Apache-2.0

Strengths

  • Includes varied graph layouts. Choose force, tree, radial, concentric, or hierarchical layouts.
  • Supports graph exploration controls. Use lasso selection, clustering, highlighting, and node expansion.

Limitations

  • Large graphs disable scene animation. Scene animation is disabled above 400 combined nodes and edges.
  • Custom nodes use WebGL geometry. Use React Three Fiber components when overriding node shapes.

Quickstart

From README.md
$ npm install react@^19 react-dom@^19 reagraph@4.32.0
import { GraphCanvas } from "reagraph";

const nodes = [{ id: "a", label: "A" }, { id: "b", label: "B" }];
const edges = [{ id: "a-b", source: "a", target: "b" }];

export default function App() {
  return (
    <div style={{ position: "relative", width: 600, height: 400 }}>
      <GraphCanvas nodes={nodes} edges={edges} />
    </div>
  );
}

Reagraph examples

From open-source projects on GitHub

react-cytoscapejs

Displays Cytoscape network graphs through a declarative React component.

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

Strengths

  • Uses Cytoscape’s layout ecosystem. Use built-in layouts or register additional layout extensions.
  • Styles graphs through selectors. Apply node and edge appearance with the stylesheet prop.

Limitations

  • Nested data needs custom diffing. Provide diff when element data or scratch fields contain nested objects.
  • Extensions must register before rendering. Register layout extensions before mounting the React graph component.

Quickstart

From README.md
$ npm install react@^18.3 react-dom@^18.3 react-cytoscapejs@2.0.0 cytoscape@3.35.0
import CytoscapeComponent from "react-cytoscapejs";

const elements = [
  { data: { id: "a", label: "A" }, position: { x: 0, y: 0 } },
  { data: { id: "b", label: "B" }, position: { x: 100, y: 0 } },
  { data: { id: "a-b", source: "a", target: "b" } },
];

export default function App() {
  return <CytoscapeComponent elements={elements} layout={{ name: "preset" }} style={{ width: 600, height: 400 }} />;
}

Renders node-based visualizations in React.

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

Quickstart

From README.md
$ npm install react@^18.3 react-dom@^18.3 reaflow@5.4.1
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

FAQ

react-force-graph-2d suits force-directed network graphs drawn on Canvas. Reagraph suits WebGL graphs with several layouts and exploration controls. React Sigma suits Sigma graphs with React event hooks.

react-force-graph-2d displays force-directed network graphs with a two-dimensional Canvas renderer. Custom nodes are drawn through the provided Canvas context.

Reagraph renders interactive WebGL network graphs with force, tree, radial, concentric, and hierarchical layouts. Scene animation turns off for large graphs.

react-cytoscapejs displays Cytoscape network graphs through a declarative React component. Layout extensions must be registered before the component mounts.

For coding agents

Found your graph visualization 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