# React graph visualization libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [React Flow](#xyflow-react) | 80.1M | 39.1K | Nov 2026 | MIT |
| [react-force-graph-2d](#react-force-graph-d) | 5.0M | 3.4K | Sep 2026 | MIT |
| [@ant-design/graphs](#ant-design-graphs) | 639.8K | 2.2K | Aug 2025 | MIT |
| [Graphin](#antv-graphin) | 602.4K | 1.1K | Apr 2025 | MIT |
| [React Sigma](#react-sigma) | 548.1K | 240 | Oct 2026 | MIT |
| [Reagraph](#reagraph) | 418.4K | 1.1K | Jun 2026 | Apache-2.0 |
| [react-cytoscapejs](#react-cytoscapejs) | 359.0K | 534 | Sep 2022 | MIT |
| [reaflow](#reaflow) | 153.1K | 2.5K | Apr 2025 | Apache-2.0 |

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

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

## Capabilities

| Library | Automatic graph layout | Default WebGL renderer |
| --- | --- | --- |
| [React Flow](#xyflow-react) | Via plugin | No |
| [react-force-graph-2d](#react-force-graph-d) | Yes | No |
| [@ant-design/graphs](#ant-design-graphs) | Yes | No |
| [Graphin](#antv-graphin) | Yes | No |
| [React Sigma](#react-sigma) | Via plugin | Yes |
| [Reagraph](#reagraph) | Yes | Yes |
| [react-cytoscapejs](#react-cytoscapejs) | Yes | No |
| [reaflow](#reaflow) | Yes | No |

## Libraries

### React Flow

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

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

- Downloads / mo: 80.1M
- Stars: 39.1K
- Last release: 13.0.2
- License: MIT
- Capabilities: [From the React Flow docs](https://reactflow.dev/)

```sh
npm install react@^19 react-dom@^19 @xyflow/react@13.0.2
```

**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=%40xyflow/react%20GitHub%20projects)

**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 [index.d.ts](https://cdn.jsdelivr.net/npm/@xyflow/react@13.0.2/dist/index.d.ts)

### react-force-graph-2d

[GitHub](https://github.com/vasturiano/react-force-graph) · [npm](https://www.npmjs.com/package/react-force-graph-2d) · [Docs](https://github.com/vasturiano/react-force-graph/blob/master/README.md)

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
- Capabilities: [From the react-force-graph-2d docs](https://github.com/vasturiano/react-force-graph/blob/master/README.md)

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

**Watch out for**

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

```sh
npm install react@^18.3 react-dom@^18.3 react-force-graph-2d@1.29.2
```

**fuma-nama/fumadocs** (13.6K stars)

[fuma-nama/fumadocs](https://github.com/fuma-nama/fumadocs) 

```tsx
function ClientOnly({
  containerRef,
  graph,
}: GraphViewProps & { containerRef: RefObject<HTMLDivElement | null> }) {
  const graphRef = useRef<ForceGraphMethods<Node, Link> | undefined>(undefined);
  const hoveredRef = useRef<Node | null>(null);
  const router = useRouter();
  const [tooltip, setTooltip] = useState<{
    x: number;
    y: number;
    content: string;
  } | null>(null);

  const handleNodeHover = (node: Node | null) => {
    const graph = graphRef.current;
    if (!graph) return;
    hoveredRef.current = node;

    if (node) {
      const coords = graph.graph2ScreenCoords(node.x!, node.y!);
      setTooltip({
        x: coords.x + 4,
        y: coords.y + 4,
        content: node.description ?? 'No description',
      });
    } else {
      setTooltip(null);
    }
  };

  // Custom node rendering: circle with text label below
  const nodeCanvasObject: ForceGraphProps['nodeCanvasObject'] = (node, ctx) => {
    const container = containerRef.current;
    if (!container) return;
    const style = getComputedStyle(container);
    const fontSize = 14;
    const radius = 5;

    // Draw circle
    ctx.beginPath();
    ctx.arc(node.x!, node.y!, radius, 0, 2 * Math.PI, false);

    const hoverNode = hoveredRef.current;
    const isActive = hoverNode?.id === node.id || hoverNode?.neighbors?.includes(node.id as string);

    ctx.fillStyle = isActive
      ? style.getPropertyValue('--color-fd-primary')
      : style.getPropertyValue('--color-purple-300');
    ctx.fill();

    // Draw text below the node
    ctx.font = `${fontSize}px Sans-Serif`;
    ctx.textAlign = 'center';
    ctx.textBaseline = 'middle';
    ctx.fillStyle = getComputedStyle(container).getPropertyValue('color');
    ctx.fillText(node.text, node.x!, node.y! + radius + fontSize);
  };

  const linkColor = (link: Link) => {
    const container = containerRef.current;
    if (!container) return '#999';
    const style = getComputedStyle(container);
    const hoverNode = hoveredRef.current;

    if (
      hoverNode &&
      typeof link.source === 'object' &&
      typeof link.target === 'object' &&
      (hoverNode.id === link.source.id || hoverNode.id === link.target.id)
    ) {
      return style.getPropertyValue('--color-fd-primary');
    }

    return `color-mix(in oklab, ${style.getPropertyValue('--color-fd-muted-foreground')} 50%, transparent)`;
  };

  // Enrich nodes with neighbors for hover effects
  const enrichedNodes = useMemo(() => {
    const { nodes, links } = structuredClone(graph);
    for (const node of nodes) {
      node.neighbors = links.flatMap((link) => {
        if (link.source === node.id) return link.target as string;
        if (link.target === node.id) return link.source as string;
        return [];
      });
    }

    return {
      nodes,
      links,
    };
  }, [graph]);

  return (
    <>
      <ForceGraph2D<NodeType, LinkType>
        ref={{
          get current() {
            return graphRef.current;
          },
          set current(fg) {
            graphRef.current = fg;
            if (fg) {
              fg.d3Force('link', forceLink().distance(200));
              fg.d3Force('charge', forceManyBody().strength(10));
              fg.d3Force('collision', forceCollide(60));
            }
          },
        }}
        graphData={enrichedNodes}
        nodeCanvasObject={nodeCanvasObject}
        linkColor={linkColor}
        onNodeHover={handleNodeHover}
        onNodeClick={(node) => {
          router.push(node.url);
        }}
        linkWidth={2}
        enableNodeDrag
        enableZoomInteraction
      />
      {tooltip && (
        <div
          className="absolute bg-fd-popover text-fd-popover-foreground size-fit p-2 border rounded-xl shadow-lg text-sm max-w-xs"
          style={{ top: tooltip.y, left: tooltip.x }}
        >
          {tooltip.content}
        </div>
      )}
    </>
  );
}

```

[apps/docs/components/graph-view.tsx](https://github.com/fuma-nama/fumadocs/blob/53e851baa5bb3db7697ea9552855cfe7209bbb8e/apps/docs/components/graph-view.tsx#L54-L184) · [More projects using react-force-graph-2d →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20using%20react-force-graph-2d%20for%20network%20graph%20visualization%2C%20node%20interactions%2C%20graph%20layouts%20and%20graph%20exploration&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 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} />;
}

```

From [index-canvas.html](https://github.com/vasturiano/react-force-graph/blob/master/README.md)

### @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 react@^18.3 react-dom@^18.3 @ant-design/graphs@2.1.1
```

**Quickstart**

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

```

From [index.d.ts](https://cdn.jsdelivr.net/npm/@ant-design/graphs@2.1.1/lib/index.d.ts) · [Find projects using @ant-design/graphs →](https://dashboard.exa.ai/playground/search?q=%40ant-design/graphs%20GitHub%20projects)

### Graphin

[GitHub](https://github.com/antvis/Graphin) · [npm](https://www.npmjs.com/package/@antv/graphin)

Provides a React toolkit for graph analysis based on G6.

- Downloads / mo: 602.4K
- Stars: 1.1K
- Last release: 3.0.5
- License: MIT
- Capabilities: [From the Graphin docs](https://github.com/antvis/Graphin)

```sh
npm install react@^18.3 react-dom@^18.3 @antv/graphin@3.0.5
```

**ant-design/ant-design-charts** (2.2K stars)

[ant-design/ant-design-charts](https://github.com/ant-design/ant-design-charts) 

```tsx
export const BaseGraph: ForwardRefExoticComponent<
  PropsWithoutRef<PropsWithChildren<GraphOptions>> & RefAttributes<Graph>
> = forwardRef<Graph, PropsWithChildren<GraphOptions>>(({ children, ...props }, ref) => {
  const { containerStyle, className, onInit, onReady, onDestroy, errorTemplate, loading, loadingTemplate, ...options } =
    props;
  const graphRef = useRef<Graph | null>(null);

  useImperativeHandle(ref, () => graphRef.current!);

  return (
    <ErrorBoundary errorTemplate={errorTemplate}>
      {loading && <ChartLoading loadingTemplate={loadingTemplate} />}
      {!isEmpty(options.data) && (
        <Graphin
          ref={(ref) => {
            graphRef.current = ref;
          }}
          className={className}
          style={containerStyle}
          options={options as G6GraphOptions}
          onInit={onInit}
          onReady={onReady}
          onDestroy={onDestroy}
        >
          {children}
        </Graphin>
      )}
    </ErrorBoundary>
  );
});

```

[packages/graphs/src/core/base-graph.tsx](https://github.com/ant-design/ant-design-charts/blob/5bb63627fab6629f4bd556e0290873c1b19fdc32/packages/graphs/src/core/base-graph.tsx#L16-L45) · [More projects using Graphin →](https://dashboard.exa.ai/playground/search?q=%40antv/graphin%20GitHub%20projects)

**Quickstart**

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

```

From [types.d.ts](https://cdn.jsdelivr.net/npm/@antv/graphin@3.0.5/lib/types.d.ts)

### React Sigma

[GitHub](https://github.com/sim51/react-sigma) · [npm](https://www.npmjs.com/package/@react-sigma/core) · [Docs](https://github.com/sim51/react-sigma/blob/main/README.md)

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

- Downloads / mo: 548.1K
- Stars: 240
- Last release: 6.0.0
- License: MIT
- Capabilities: [From the React Sigma docs](https://github.com/sim51/react-sigma/blob/main/README.md)

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

**Watch out for**

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

```sh
npm install react@^18.3 react-dom@^18.3 @react-sigma/core@6.0.0 graphology@0.26.0 sigma@4.0.6
```

**HKUDS/LightRAG** (40.7K stars)

[HKUDS/LightRAG](https://github.com/HKUDS/LightRAG) 

```tsx
const FocusOnNode = ({ node, move }: { node: string | null; move?: boolean }) => {
  const sigma = useSigma()
  const { gotoNode } = useCamera()

  /**
   * When the selected item changes, highlighted the node and center the camera on it.
   */
  useEffect(() => {
    const graph = sigma.getGraph();

    if (move) {
      if (node && graph.hasNode(node)) {
        try {
          graph.setNodeAttribute(node, 'highlighted', true);
          gotoNode(node);
        } catch (error) {
          console.error('Error focusing on node:', error);
        }
      } else {
        // If no node is selected but move is true, reset to default view
        sigma.setCustomBBox(null);
        sigma.getCamera().animate({ x: 0.5, y: 0.5, ratio: 1 }, { duration: 0 });
      }
      useGraphStore.getState().setMoveToSelectedNode(false);
    } else if (node && graph.hasNode(node)) {
      try {
        graph.setNodeAttribute(node, 'highlighted', true);
      } catch (error) {
        console.error('Error highlighting node:', error);
      }
    }

    return () => {
      if (node && graph.hasNode(node)) {
        try {
          graph.setNodeAttribute(node, 'highlighted', false);
        } catch (error) {
          console.error('Error cleaning up node highlight:', error);
        }
      }
    }
  }, [node, move, sigma, gotoNode])

  return null
}

```

[lightrag_webui/src/components/graph/FocusOnNode.tsx](https://github.com/HKUDS/LightRAG/blob/64e57fc241653bef1fb284ea8cf6b8852460cbc6/lightrag_webui/src/components/graph/FocusOnNode.tsx#L8-L52) · [More projects using React Sigma →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20using%20%40react-sigma/core%20for%20network%20graph%20visualization%2C%20node%20interactions%2C%20graph%20layouts%20and%20graph%20exploration&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 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 }} />;
}

```

From [start-setup.md](https://cdn.jsdelivr.net/npm/@react-sigma/core@6.0.0/lib/components/SigmaContainer.d.ts)

### Reagraph

[GitHub](https://github.com/reaviz/reagraph) · [npm](https://www.npmjs.com/package/reagraph) · [Docs](https://github.com/reaviz/reagraph/blob/master/README.md)

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
- Capabilities: [From the Reagraph docs](https://github.com/reaviz/reagraph/blob/master/README.md)

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

**Watch out for**

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

```sh
npm install react@^19 react-dom@^19 reagraph@4.32.0
```

**builderz-labs/mission-control** (6.5K stars)

[builderz-labs/mission-control](https://github.com/builderz-labs/mission-control) 

```tsx
() => {
    if (!graphNodes.length) return
    // reagraph force layout needs time to settle before fitNodesInView works
    const t1 = setTimeout(() => graphRef.current?.fitNodesInView(undefined, { animated: false }), 800)
    const t2 = setTimeout(() => graphRef.current?.fitNodesInView(undefined, { animated: false }), 2500)
    const t3 = setTimeout(() => graphRef.current?.fitNodesInView(undefined, { animated: false }), 5000)
    const t4 = setTimeout(() => graphRef.current?.fitNodesInView(undefined, { animated: false }), 8000)
    return () => { clearTimeout(t1); clearTimeout(t2); clearTimeout(t3); clearTimeout(t4) }
  }

```

[src/components/panels/memory-graph.tsx](https://github.com/builderz-labs/mission-control/blob/c1a846fe020567bb3ceb3b65db9f00db875618cd/src/components/panels/memory-graph.tsx#L265-L273) · [More projects using Reagraph →](https://dashboard.exa.ai/playground/search?q=React%20TypeScript%20JavaScript%20applications%20using%20reagraph%20for%20network%20graph%20visualization%2C%20node%20interactions%2C%20graph%20layouts%20and%20graph%20exploration&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 { 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>
  );
}

```

From [README.md](https://reagraph.dev/docs/getting-started/Basics)

### react-cytoscapejs

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

Displays Cytoscape network graphs through a declarative React component.

- 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/blob/master/README.md)

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

**Watch out for**

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

```sh
npm install react@^18.3 react-dom@^18.3 react-cytoscapejs@2.0.0 cytoscape@3.35.0
```

**Quickstart**

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

```

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%20TypeScript%20JavaScript%20applications%20using%20react-cytoscapejs%20for%20network%20graph%20visualization%2C%20node%20interactions%2C%20graph%20layouts%20and%20graph%20exploration&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)

### reaflow

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

Renders node-based visualizations in React.

- Downloads / mo: 153.1K
- Stars: 2.5K
- Last release: 5.4.1
- License: Apache-2.0
- Capabilities: [From the reaflow docs](https://reaflow.dev/)

```sh
npm install react@^18.3 react-dom@^18.3 reaflow@5.4.1
```

**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=reaflow%20GitHub%20projects)

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

## FAQ

### Which React graph visualization library should I use?

[react-force-graph-2d](#react-force-graph-d) suits force-directed network graphs drawn on Canvas. [Reagraph](#reagraph) suits WebGL graphs with several layouts and exploration controls. [React Sigma](#react-sigma) suits Sigma graphs with React event hooks.

### What is react-force-graph?

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

### What is Reagraph?

[Reagraph](#reagraph) renders interactive WebGL network graphs with force, tree, radial, concentric, and hierarchical layouts. Scene animation turns off for large graphs.

### How do I use Cytoscape in React?

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

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React graph visualization libraries react-force-graph-2d Reagraph React Sigma react-cytoscapejs code examples",
    "numResults": 5
  }
}
```

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