NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #4031 most downloaded on npm
React Flow - A highly customizable React library for building node-based editors and interactive flow charts.
Latest stable
12.12.1
Last release 13 days ago
08 Nov 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 58 of 58 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
91 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
Updated dependencies \[`d2da5765`]:
React Flow 12 is finally out! With a new package name @xyflow/react!
React Flow 12 is finally out! With a new package name @xyflow/react!
width, height and handles for the nodes. This makes it possible to render a flow on the server and hydrate on the client: SSR guide
width and height were set by the library as soon as the nodes got measured. This still happens, but we are now using measured.width and measured.height to store this information. In the previous versions there was always a lot of confusion about width and height. It’s hard to understand, that you can’t use it for passing an actual width or height. It’s also not obvious that those attributes get added by the library. We think that the new implementation solves both of the problems: width and height are optional attributes that can be used to define dimensions and the measured dimensions are stored in measured.useHandleConnections and useNodesData and the new updateNode and updateNodeData functions can be used for managing the data flow between your nodes: computing flows guide
colorMode prop (”light”, “dark” or “system”): dark mode example
There is more! Besides the new main features, we added some minor things that were on our list for a long time. We also started to use TS docs for better docs. We already started to add some docs for some types and hooks which should improve the developer experience.
useConnection hook: With this hook you can access the ongoing connection. For example, you can use it for colorizing handles styling a custom connection line based on the current start / end handles.viewport: This is an advanced feature. Possible use cases are to animate the viewport or round the transform for lower res screens for example. This features brings two new props: viewport and onViewportChange.ViewportPortal component: This makes it possible to render elements in the viewport without the need to implement a custom node.onDelete handler: We added a combined handler for onDeleteNodes and onDeleteEdges to make it easier to react to deletions.onBeforeDelete handler: With this handler you can prevent/ manage deletions.isValidConnection prop: This makes it possible to implement one validation function for all connections. It also gets called for programmatically added edges.autoPanSpeed prop: For controlling the speed while auto panning.patternClassName prop to be able to style the background pattern by using a class name. This is useful if you want to style the background pattern with Tailwind for example.onMove callback gets triggered for library-invoked viewport updates (like fitView or zoom-in)deleteElements now returns deleted nodes and deleted edgesorigin attribute for nodesselectable attribute for edgesBezierEdge, StepEdge, SmoothStepEdge and StraightEdge componentssourceHandle and targetHandle attributes when those attributes are set. (We used to pass sourceHandle: null and targetHandle: null)nodeDragThreshold is 1 by default instead of 0selectable, deletable, draggable and parentId to NodePropsYour coding agent can read these notes before it upgrades. Set up the MCP server →
add paneDistanceClick prop (max distance between mousedown/up that will trigger a click)
paneDistanceClick prop (max distance between mousedown/up that will trigger a click)onNodeDragStop are set to dragging=falsereturn Promises for setViewport, fitView, fitBounds and zoomTo to be able to await viewport update
setViewport, fitView, fitBounds and zoomTo to be able to await viewport update- add autoPanSpeed prop
autoPanSpeed propuseConnection returns ConnectionState with toNode and toHandle
useConnection returns ConnectionState with toNode and toHandletoNode and toHandle to custom connection line propsfix window bug for SSR for real
window bug for SSR for real- fix window bug for SSR
window bug for SSR⚠️ rename updateEdge to reconnectEdge and related APIs #4373
updateEdge to reconnectEdge and related APIs #4373- fix node origin bug
add updateEdge and updateEdgeData helpers to useReactFlow
updateEdge and updateEdgeData helpers to useReactFlowupdate internals on node resizer updates
node.hidden is toggledupdateNodeData argument type - thanks @ogropposelectable, deletable and draggable to node and edge propsparentId to node propsevaluateAbsolutePosition- thanks @lcsfortdon't show nodeTypes warning if not necessary you've created a new nodeTypes or edgeTypes
HandleComponentProps type, only export HandleProps typeadd string array to UpdateNodeInternals thanks @DenizUgur
defaultNodesUpdateNodeInternals thanks @DenizUguruseReactFlowKeyCode and Align typeInstance in favour of ReactFlowInstance typeNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
a better NodeResizer that works with subflows. Child nodes do not move when parent node gets resized and parent extent is taken into account
NodeResizer that works with subflows. Child nodes do not move when parent node gets resized and parent extent is taken into accountsetNodes batchingselection box is not interrupted by selectionKey being let go
OnNodeDrag typedefaultEdgeOptions markers not being appliedgetNodesBounds and add second param for passing optionsexpandParent for child nodesNothing published for this version
batch setNodes and setEdges from useReactFlow
deleteElementsapplyChangessetNodes and setEdges from useReactFlowaria-label prop for <Controls />fix applyChanges: handle multi changes for one node, deletions and expandParent
XYResizer from @xyflow/systemapplyNodeChanges and applyEdgeChangesfix applyChanges: handle empty flows + addNodes/addEdges closes
fix edges styles when using base.css
### Minor changes - fix connection line rendering - fix multi handle
### Minor changes - fix edge rendering
React Flow v12 is coming soon! We worked hard over the past months and tried to make as few breaking changes as possible (there are some). We are in n…
React Flow v12 is coming soon! We worked hard over the past months and tried to make as few breaking changes as possible (there are some). We are in no rush to release v12, so we’d be happy to hear any early feedback so we can adjust the API or redefine new features before launching stable v12. 🚀 The big topics for this version are:
Svelte Flow had a big impact on this release as well. While combing through each line of React Flow, we created framework agnostic helpers, found bugs, and made some under the hood improvements. All of these changes are baked into the v12 release as a welcome side-effect of that launch. 🙌🏻 We also improved the performance for larger flows with the help of Ivan.
Before you can try out the new features, you need to do some minor updates:
reactflow to @xyflow/react and the main component is no longer a default, but a named import:
import ReactFlow from 'reactflow';import { ReactFlow } from '@xyflow/react';node.computed
node.width, node.height ,node.positionAbsolutenode.computed.width, node.computed.height and node.computed.positionAbsolute . (node.width/ node.height can now be used for SSG)setNodes((nds) =>
nds.map((node) => {
node.hidden = true;
return node;
})
);
setNodes((nds) =>
nds.map((node) => ({
...node,
hidden: true,
}))
);
posX/posY is now called positionAbsoluteX/positionAbsoluteYNodeData generic. The new way is to define your own node type for the whole app and then only use that one. The big advantage of this is, that you can have multiple node types with different data structures and always be able to distinguish by checking the node.type attribute.
applyNodeChange<NodeData, NodeType>type MyNodeType = Node<{ value: number }, ‘number’> | Node<{ value: string }, ‘text’>; applyNodeChange<MyNodeType>useNodes, useNodesState, useEdgesState, applyNodeChange, onInit, applyEdgeChanges , MiniMapPropsgetTransformForBounds (new name: getViewportForBounds),getRectOfNodes (new name: getNodesBounds)project (new name: screenToFlowPosition)getMarkerEndIdNow that you successfully migrated to v12, you can use all the fancy features. As mentioned above, the biggest updates for v12 are:
width, height and handles for the nodes. This makes it possible to render a flow on the server and hydrate on the client: codesandbox
width and height were set by the library as soon as the nodes got measured. This still happens, but we are now using computed.width and computed.height to store this information. The positionAbsolute attribute also gets stored in computed . In the previous versions there was always a lot of confusion about width and height. It’s hard to understand, that you can’t use it for passing an actual width or height. It’s also not obvious that those attributes get added by the library. We think that the new implementation solves both of the problems: width and height are optional attributes that can be used to define dimensions and everything that is set by the library, is stored in computed.useHandleConnections and useNodesData and the new updateNode and updateNodeData functions can be used for managing the data flow between your nodes: codesandbox
colorMode prop (”light”, “dark” or “system”): codesandbox
There is more! Besides the new main features, we added some minor things that were on our list for a long time. We also started to use TS docs for better docs. We already started to add some docs for some types and hooks which should improve the developer experience.
useConnection hook: This hook makes it possible to handle an ongoing connection. For example, you can use it for colorizing handles.onDelete handler: We added a combined handler for onDeleteNodes and onDeleteEdges to make it easier to react to deletions.isValidConnection prop: This makes it possible to implement one validation function for all connections. It also gets called for programmatically added edges.viewport: This is definitely an advanced feature. Possible use cases are to animate the viewport or round the transform for lower res screens for example. This features brings two new props: viewport and onViewportChange.ViewportPortal component: This makes it possible to render elements in the viewport without the need to implement a custom node.patternClassName to be able to style the background pattern by using a class name. This is useful if you want to style the background pattern with Tailwind for example.onMove callback gets triggered for library-invoked viewport updates (like fitView or zoom-in)deleteElements now returns deleted nodes and deleted edgesorigin attribute for nodesselectable attribute for edgesBezierEdge, StepEdge, SmoothStepEdge and StraightEdge componentssourceHandle and targetHandle attributes when those attributes are set. (We used to pass sourceHandle: null and targetHandle: null)These changes are not really user-facing, but it could be important for folks who are working with the React Flow store:
nodeInternals map with a nodes array. We added a new nodeLookup map that serves as a lookup, but we are not creating a new map object on any change so it’s really only useful as a lookup.connectionNodeId, connectionHandleId, connectionHandleType from the store and added connectionStartHandle.nodeId, connectionStartHandle.handleId, …data-id to edgesWith v12 the reactflow package was renamed to @xyflow/react - you can find the v11 source and the reactflow changelog on the v11 branch.
One column per month.