React Flow

A highly customizable React library for building node-based editors, diagrams, and interactive flow charts.

Library
npm
v12.12.0
38,512 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 96
Maintenance 100
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 88
Code Quality 78
Innovation 85
Learning Curve 85

React Flow (published as @xyflow/react) is the React-focused package inside the xyflow monorepo, a set of open-source libraries for building node-based UIs such as workflow builders, pipeline editors, and interactive diagrams. It ships a controlled <ReactFlow /> component, a zustand-backed store, and a large family of hooks (useNodesState, useEdgesState, useReactFlow, useNodeConnections, and more) that give applications full control over nodes, edges, and the pan/zoom viewport while React Flow handles rendering, dragging, connection logic, and selection out of the box.

The library is built on @xyflow/system, a headless core shared with the sibling Svelte Flow package, so viewport math, drag/resize/handle logic, and layout utilities are framework-agnostic and battle-tested across both ecosystems. It is dual-licensed in spirit: fully usable and MIT-licensed for any project, with an optional React Flow Pro subscription and GitHub Sponsors for teams that want to fund ongoing development, plus a Pro-only template/examples library rather than any gating of the open-source package’s functionality.

What You Get

  • A <ReactFlow /> container component plus plugin components (Background, MiniMap, Controls, NodeToolbar, NodeResizer, EdgeToolbar) that compose around it
  • A rich hook API (useNodesState, useEdgesState, useReactFlow, useNodeConnections, useHandleConnections, useViewport, useOnSelectionChange, useUpdateNodeInternals, and more) for controlled, imperative graph access
  • Fully custom node and edge types with support for multiple handles, custom connection lines, and edge labels rendered via EdgeLabelRenderer/ViewportPortal
  • Built-in interactions out of the box: drag-to-move, drag-to-connect, multi-selection, keyboard shortcuts, and smooth pan/zoom powered by @xyflow/system
  • TypeScript-first types for Node, Edge, and the full ReactFlowInstance API, so custom node/edge data is type-checked end to end

Common Use Cases

  • Visual workflow and automation builders (e.g. n8n-style pipeline editors) where users wire steps together
  • Data pipeline, ETL, or dependency-graph visualizers that need draggable, connectable nodes
  • No-code/low-code app builders and AI agent flow editors that need a canvas for chaining logic blocks
  • Org charts, mind maps, and diagramming tools that need custom-styled nodes and edges
  • Internal admin tools that visualize state machines, decision trees, or system architecture diagrams

Under The Hood

Architecture React Flow’s package (packages/react) is organized as container components (src/container/ReactFlow, GraphView, Viewport, ZoomPane, Pane, EdgeRenderer, NodeRenderer) that compose around a central zustand store (src/store/index.ts, ~450 lines) created per-instance via createWithEqualityFn. The store owns node/edge state, viewport state, and derived lookups (nodeLookup, connectionLookup), and delegates viewport math, drag handling, resize handling, and connection logic to the framework-agnostic @xyflow/system package (packages/system/src), which is also consumed by the sibling Svelte Flow package. React-specific concerns — hooks (src/hooks, ~25 files covering useReactFlow, useNodesState, useHandleConnections, etc.), context providers (ReactFlowProvider, BatchProvider, StoreContext), and DOM-facing components (Handle, NodeWrapper, EdgeWrapper) — sit on top of that shared core, giving a clean separation between reusable graph-engine logic and React rendering/hook ergonomics.

Tech Stack Written entirely in TypeScript, React Flow targets React >=17 as a peer dependency (with @types/react/@types/react-dom marked optional) and depends on zustand ^4.4.0 for state management and classcat ^5.0.3 for conditional class names, plus its own workspace-internal @xyflow/system. The monorepo (managed with pnpm workspaces and Turborepo, using Changesets for versioned releases) builds the package with Rollup via a shared @xyflow/rollup-config, producing ESM, UMD, and type-declaration outputs, with a separate PostCSS pipeline compiling src/styles/{base,style}.css into the published dist/base.css and dist/style.css.

Code Quality There are no colocated unit tests inside packages/react/src; correctness is instead validated by an end-to-end Playwright suite (tests/playwright/e2e — nodes, edges, pane, node-toolbar, and props specs) that drives real browser interactions against example apps, plus a Cypress suite under examples/react/cypress. Source files are consistently typed, use extensive JSDoc comments (with @public/@example tags) on public hooks like useReactFlow, and follow a uniform naming convention (use-prefixed hooks, PascalCase components) enforced by a shared @xyflow/eslint-config across the workspace.

API Design The public API centers on a small number of well-documented hooks (useNodesState/useEdgesState mirror React’s own useState idiom for graphs) and a single heavily-typed <ReactFlow /> component whose prop names mirror their corresponding event handlers (onNodesChange, onConnect, onNodeDragStop, etc.), keeping the learning curve shallow for anyone familiar with controlled React components. Getting started requires only two npm-installed pieces (the package and its CSS import) and produces a working, pannable/zoomable graph in under 20 lines, while advanced customization (custom nodes, custom connection lines, imperative viewport control via useReactFlow) is opt-in rather than required upfront.

Used by 82 apps in this directory

TypeScript
100%
Other

Activepieces

AI Assistants · Automation · Mcp

24,756

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript 100%
Updated 4 days ago
TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 5 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 4 days ago
TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,015

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
58
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 3 months ago
Rust
86%
Other

Arroyo

Analytics · Data Engineering

5,039

A distributed stream processing engine written in Rust that lets you write SQL to run stateful, real-time computations over data streams with subsecond results.

View details
86
Repo Health
74
Technical
62
Dependency
Built with
Rust 86%
Updated 1 weeks ago
Python
62%
MIT

AutoGen

AI Development · Automation

61,194

Build autonomous and human-in-the-loop multi-agent AI systems with a layered, event-driven Python and .NET framework pioneered at Microsoft Research.

View details
56
Repo Health
78
Technical
73
Dependency
Built with
Python 62%
C# 25%
TypeScript 12%
Updated 5 months ago
Python
66%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,596

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 66%
TypeScript 33%
Updated 4 days ago
JavaScript
100%
Other

Automatisch

Automation · No Code Platforms

13,979

Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.

View details
49
Repo Health
78
Technical
62
Dependency
Built with
JavaScript 100%
Updated 7 months ago
TypeScript
45%
AGPL 3.0

BrowserOS

AI Assistants · Browser

13,763

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 23%
Python 18%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers