react-flow

Installation
SKILL.md

React Flow (@xyflow/react)

Implement interactive node-based graphs and workflow editors using @xyflow/react (v12 and v13, React 18/19).

Implementation Gates

Run these checks in order before treating any integration as complete:

  1. CSS & container dimensions — Import @xyflow/react/style.css (v13, wrapped in @layer xyflow for Tailwind v4 precedence) or @xyflow/react/dist/style.css (v12), and give the wrapper element explicit dimensions (width and height).
  2. Stable nodeTypes / edgeTypes — Define nodeTypes and edgeTypes at module scope or memoize with useMemo; never create inline object literals on every render (causes full node/edge remounting).
  3. Provider boundary — Any component calling useReactFlow(), useNodesData(), useNodeConnections(), or store hooks must be a descendant of <ReactFlowProvider> (or rendered inside <ReactFlow />).
  4. Measured vs SSR dimensions — Read DOM-measured node sizes from node.measured?.width / node.measured?.height (falling back to node.width ?? defaultWidth). For SSR/SSG, provide static width/height or initialWidth/initialHeight on nodes so fitView and initial layout work without DOM measurement.

Quick Start & TypeScript Unions

Installs
1.4K
GitHub Stars
91
First Seen
Jan 20, 2026