unstale

npm / @xyflow/react

@xyflow/react

What changed in @xyflow/react 11 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.

122 breaking80 new APIs and options9 performance26 behavior and defaults2 tooling38 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@xyflow/react 13123 changes

Breaking changes 78

  • Replaces NodeAddChange and EdgeAddChange.

    13.0.0upgrade guide

  • Replaces NodeAddChange and EdgeAddChange as the generic add change type.

    13.0.0upgrade guide

  • This helper is no longer exported; apply changes with the changeset's applyTo() method.

    13.0.0upgrade guide

  • This helper is no longer exported; use the changeset’s applyTo() method instead.

    13.0.0upgrade guide

  • The system color mode is now used by default; forceColorMode opts out.

    13.0.0release notes

  • React Flow 13 no longer supports the colorMode prop and detects the site's color mode automatically.

    13.0.0upgrade guide

  • The colorMode prop is no longer supported; color mode is detected automatically, or can be forced with forceColorMode.

    13.0.0upgrade guide

  • Replaces NodeDimensionChange; change types no longer use node and edge prefixes.

    13.0.0upgrade guide

  • Replaces NodeDimensionChange as the generic change type for nodes and edges.

    13.0.0upgrade guide

  • A changeset passed to onEdgesChange replaces the array of changes and provides methods to apply, filter, and retrieve changes.

    13.0.0upgrade guide

  • Now defaults to true so overlapping edges can be reconnected by selecting them first.

    13.0.0release notes

  • Now defaults to true, elevating edges selected directly or through selection of connected nodes.

    13.0.0upgrade guide

  • Now defaults to true, elevating edges when selected directly or when their connected nodes are selected.

    13.0.0upgrade guide

  • The default padding is now 5%.

    13.0.0release notes

  • Numbers are now interpreted as pixel values instead of legacy units; use percentage values instead.

    13.0.0release notes

  • Unitless padding values are now interpreted as pixels.

    13.0.0upgrade guide

  • Removed; use getNodeConnections({ nodeId, type, handleId }) instead.

    13.0.0release notes

  • Removed; use getNodeConnections({ nodeId, type, handleId }) from useReactFlow instead.

    13.0.0upgrade guide

  • Use this useReactFlow method with nodeId, type, and handleId to retrieve NodeConnection objects.

    13.0.0upgrade guide

  • The measured handle geometry type is now named HandleBounds.

    13.0.0release notes

  • The type was renamed to HandleBounds to avoid clashes with the Handle component.

    13.0.0upgrade guide

  • The measured handle geometry type was renamed from Handle to avoid colliding with the Handle component.

    13.0.0release notes

  • New name for the Handle type, including types used for fromHandle or toHandle on ConnectionState.

    13.0.0upgrade guide

  • The Handle type was renamed to HandleBounds to avoid a name clash with the Handle component.

    13.0.0upgrade guide

  • Removed; use NodeConnection instead.

    13.0.0release notes

  • Clicks are suppressed only after a drag changed node positions; nodeDragThreshold and snapGrid control this.

    13.0.0release notes

  • A node click fires unless dragging moved the node or the pointer was released outside it; small pointer movements no longer suppress clicks.

    13.0.0upgrade guide

  • Removed. Node clicks are suppressed only after a drag changes node positions; use nodeDragThreshold and snapGrid to control this.

    13.0.0release notes

  • Removed; if previously set, use its value for nodeDragThreshold instead.

    13.0.0upgrade guide

  • The prop was removed; use nodeDragThreshold if you need to configure the drag threshold.

    13.0.0upgrade guide

  • Use this in place of nodeClickDistance when a click-distance value was set; small pointer movements no longer prevent node clicks.

    13.0.0upgrade guide

  • The to value is now in flow coordinates instead of screen coordinates.

    13.0.0release notes

  • The to value is now provided in flow coordinates rather than screen coordinates, on the FinalConnectionState passed as the last argument.

    13.0.0upgrade guide

  • The to value on the FinalConnectionState argument is now in flow coordinates instead of screen coordinates.

    13.0.0upgrade guide

  • Receives an EdgeChangeset class instead of the previous change value.

    13.0.0release notes

  • The handler now receives an EdgeChangeset instead of an array of changes; use its applyTo() method to apply changes.

    13.0.0upgrade guide

  • The handler now receives an EdgeChangeset instead of an array of changes.

    13.0.0upgrade guide

  • Receives a NodeChangeset class instead of the previous change value.

    13.0.0release notes

  • The handler now receives a NodeChangeset instead of an array of changes; use its applyTo() method to apply changes.

    13.0.0upgrade guide

  • The handler now receives a NodeChangeset instead of an array of changes.

    13.0.0upgrade guide

  • Replaced by paneDragThreshold.

    13.0.0release notes

  • Replaced by paneDragThreshold.

    13.0.0upgrade guide

  • Replaced by paneDragThreshold, which controls when panning starts.

    13.0.0upgrade guide

  • Replaces paneClickDistance and defaults to 1; panning or selecting starts only after pointer movement exceeds the threshold, otherwise the interaction counts as a click. Works with every mouse button.

    13.0.0release notes

  • Replaces paneClickDistance; the pane does not move until the pointer exceeds the threshold, while shorter movement fires onPaneClick.

    13.0.0upgrade guide

  • Replaces paneClickDistance and delays panning until the pointer moves further than the configured pixel threshold.

    13.0.0upgrade guide

  • Replaces NodePositionChange; change types no longer use node and edge prefixes.

    13.0.0upgrade guide

  • Replaces NodePositionChange as the generic change type.

    13.0.0upgrade guide

  • React 18 is now the minimum supported version.

    13.0.0release notes

  • Pane grab and grabbing cursors are set on a ::before overlay; custom cursor styles should target the pseudo-element.

    13.0.0upgrade guide

  • Pane grab and grabbing cursors are applied to a ::before overlay rather than the pane itself; cursor customizations should target the pseudo-element.

    13.0.0upgrade guide

  • The lib (react) entry was removed from the store.

    13.0.0release notes

  • React Flow 13 requires React 18 or higher.

    13.0.0upgrade guide

  • Replaces NodeRemoveChange and EdgeRemoveChange.

    13.0.0upgrade guide

  • Replaces NodeRemoveChange and EdgeRemoveChange as the generic remove change type.

    13.0.0upgrade guide

  • Replaces NodeReplaceChange and EdgeReplaceChange as the generic replace change type.

    13.0.0upgrade guide

  • Replaces NodeSelectionChange and EdgeSelectionChange.

    13.0.0upgrade guide

  • Replaces NodeSelectionChange and EdgeSelectionChange as the generic selection change type.

    13.0.0upgrade guide

  • The UMD build was removed.

    13.0.0release notes

  • React Flow 13 no longer ships a UMD build.

    13.0.0upgrade guide

  • React Flow no longer ships a UMD build.

    13.0.0upgrade guide

  • Store hooks no longer accept an equality function argument; use useShallow or useEqualSelector instead.

    13.0.0upgrade guide

  • New selector for store hooks, which no longer accept an equality function as an argument.

    13.0.0upgrade guide

  • The deprecated hook has been removed.

    13.0.0release notes

  • Removed; use useNodeConnections instead.

    13.0.0upgrade guide

  • Use this hook to retrieve a list of NodeConnection objects in place of useHandleConnections.

    13.0.0upgrade guide

  • Replaces useStoreApi and returns a ReactFlowStoreApi for accessing individual stores.

    13.0.0upgrade guide

  • Replaces useStoreApi and provides access to individual React Flow stores through the returned API object.

    13.0.0upgrade guide

  • Use useShallow instead of passing an equality function to the replacement store hooks.

    13.0.0release notes

  • Replaced by useNodesStore, useEdgesStore, useViewportStore, useOptionsStore, useConnectionStore, and useSelectionStore; the replacement hooks do not accept an equality function.

    13.0.0release notes

  • The hook is no longer available; use specialized store hooks instead.

    13.0.0upgrade guide

  • The general store hook is no longer available; use specialized store hooks instead.

    13.0.0upgrade guide

  • Renamed to useReactFlowStoreApi; the new hook provides access to the individual stores.

    13.0.0upgrade guide

  • Renamed to useReactFlowStoreApi.

    13.0.0upgrade guide

  • Styles shipped with React Flow are now wrapped in the xyflow CSS layer, affecting style precedence and layer ordering.

    13.0.0upgrade guide

  • React Flow styles are now wrapped in the xyflow CSS layer, so layer ordering can determine how styles interact.

    13.0.0upgrade guide

  • Projects using Zustand must update to Zustand 5.

    13.0.0upgrade guide

  • Update to Zustand 5 before migrating if your project uses Zustand.

    13.0.0upgrade guide

New APIs and options 32

  • Added to useReactFlow, useSvelteFlow, and useVueFlow to change a node's parent without calculating a new position.

    13.0.0release notes

  • New useReactFlow helper to update a node's parent while keeping its position on screen.

    13.0.0upgrade guide

  • A new useReactFlow helper updates a node’s parent while keeping its position on screen.

    13.0.0upgrade guide

  • Added as an opt-out from using system color mode by default.

    13.0.0release notes

  • Use this prop to force React Flow to use a specified color mode regardless of the site's color mode.

    13.0.0upgrade guide

  • Forces React Flow to use a specified ColorMode regardless of the site’s detected color mode.

    13.0.0upgrade guide

  • NodeChangeset and EdgeChangeset provide this utility method to get all changes of a specific type.

    13.0.0upgrade guide

  • NodeChangeset and EdgeChangeset provide this utility method to get all changes for a specific node or edge.

    13.0.0upgrade guide

  • Use this API in place of getHandleConnections; type is optional and id is now handleId. Added to useSvelteFlow.

    13.0.0release notes

  • Use this from useReactFlow instead of getHandleConnections; it returns a list of NodeConnection objects.

    13.0.0upgrade guide

  • A changeset passed to onNodesChange replaces the array of changes and provides methods to apply, filter, and retrieve changes.

    13.0.0upgrade guide

  • Replaces NodeReplaceChange and EdgeReplaceChange.

    13.0.0upgrade guide

  • New specialized hook for accessing the connection store; it returns ConnectionStore.

    13.0.0upgrade guide

  • Provides access to the connection store and returns ConnectionStore state.

    13.0.0upgrade guide

  • Added a hook for subscribing to changes to a specific edge.

    13.0.0release notes

  • New specialized hook for accessing the edges store; it returns EdgesStore.

    13.0.0upgrade guide

  • Provides access to the edges store and returns EdgesStore state.

    13.0.0upgrade guide

  • Added the useEqualSelector hook.

    13.0.0release notes

  • Added a hook for subscribing to changes to a specific node.

    13.0.0release notes

  • Use this hook instead of useHandleConnections; it returns a list of NodeConnection objects.

    13.0.0upgrade guide

  • New specialized hook for accessing the nodes store; it returns NodesStore.

    13.0.0upgrade guide

  • Provides access to the nodes store and returns NodesStore state.

    13.0.0upgrade guide

  • New specialized hook for accessing options; it returns ReactFlowState.

    13.0.0upgrade guide

  • Provides access to the options store and returns ReactFlowState.

    13.0.0upgrade guide

  • New specialized hook for accessing the selection store; it returns SelectionStore.

    13.0.0upgrade guide

  • Provides access to the selection store and returns SelectionStore state.

    13.0.0upgrade guide

  • Exported selector to use instead of passing an equality function to store hooks.

    13.0.0upgrade guide

  • New specialized hook for accessing the viewport store; it returns ViewportStore.

    13.0.0upgrade guide

  • Provides access to the viewport store and returns ViewportStore state.

    13.0.0upgrade guide

  • Added a stylesheet that ships the xyflow default theme on top of base.css.

    13.0.0release notes

  • A style import is now available from this package path.

    13.0.0release notes

  • New separate CSS file providing the React Flow theme, available to import instead of the default styles.

    13.0.0upgrade guide

Performance 2

  • The store is split into smaller stores, and components subscribed to a single node or edge only re-render when that element changes.

    13.0.0upgrade guide

  • Consumers no longer re-render when only a node's position, selection, or measurements change.

    13.0.0release notes

Behavior and default changes 5

  • Exported styles now live in the @layer xyflow CSS layer.

    13.0.0release notes

  • In subflows, parent nodes may appear after their child nodes in the nodes array.

    13.0.0upgrade guide

  • The connection APIs across frameworks now use NodeConnection.

    13.0.0release notes

  • Parent nodes no longer need to appear before child nodes in the nodes array.

    13.0.0release notes

  • For subflows, parent nodes can appear after their child nodes in the nodes array.

    13.0.0upgrade guide

Fixes and other changes 6

  • EdgeToolbar uses the elevated zIndex so the toolbar stacks with its edge.

    13.0.2release notes

  • Moving a selected node with the arrow keys now announces its new position instead of its previous position.

    13.0.2release notes

  • Functions such as fitView and setCenter now resolve with false when user interaction or another viewport change interrupts the animation, instead of leaving promises pending.

    13.0.0release notes

  • The data type is narrowed by type when NodeProps receives a union of node types.

    13.0.0release notes

  • Animated viewport functions now resolve false if interrupted before reaching their target, instead of leaving promises unsettled.

    13.0.0upgrade guide

  • Animated viewport functions resolve with false when interrupted instead of leaving their promises unsettled.

    13.0.0upgrade guide

@xyflow/react 12115 changes

Breaking changes 32

  • Pane clicks no longer fire when a connection ends on the pane.

    12.11.1release notes

  • Using handleId without handleType now produces a type error.

    12.11.0release notes

  • Child nodes belonging to different parents are prevented from overlapping.

    12.9.0release notes

  • Custom implementations must handle the replace event; the reset event was removed.

    12.0.0upgrade guide

  • Custom implementations must handle the replace event; the reset event was removed.

    12.0.0upgrade guide

  • Replaces the react-flow__handle-connecting class for the connecting-from handle state.

    12.0.0upgrade guide

  • Replaces the react-flow__handle-connecting class for the connecting-to handle state.

    12.0.0upgrade guide

  • Edge updates no longer support object mutation; create and return a new edge when changing an attribute.

    12.0.0upgrade guide

  • Renames the edge.updatable field to edge.reconnectable.

    12.0.0upgrade guide

  • Renames edgesUpdatable to edgesReconnectable.

    12.0.0upgrade guide

  • The deprecated function was removed.

    12.0.0upgrade guide

  • The second argument now takes an options object containing nodeOrigin rather than nodeOrigin directly.

    12.0.0upgrade guide

  • Removed; use getNodesBounds instead.

    12.0.0upgrade guide

  • Removed; use getViewportForBounds instead.

    12.0.0upgrade guide

  • Node updates no longer support object mutation; create and return a new node when changing an attribute.

    12.0.0upgrade guide

  • Node height and width now specify fixed inline dimensions; measured dimensions are stored separately in node.measured.

    12.0.0upgrade guide

  • Measured node dimensions are now stored in node.measured.width and node.measured.height rather than node.width and node.height.

    12.0.0upgrade guide

  • Node width and height now specify fixed inline dimensions; measured dimensions are stored separately in node.measured.

    12.0.0upgrade guide

  • Renames nodeInternals to nodeLookup for looking up nodes in the store.

    12.0.0upgrade guide

  • The callback now fires for library-invoked viewport updates such as fitView or zoom-in.

    12.0.0upgrade guide

  • Renames onEdgeUpdate to onReconnect; related edge reconnection callbacks, options, and fields are renamed to use reconnect terminology.

    12.0.0upgrade guide

  • Renames onEdgeUpdateEnd to onReconnectEnd.

    12.0.0upgrade guide

  • Renames onEdgeUpdateStart to onReconnectStart.

    12.0.0upgrade guide

  • Renames the subflow node field parentNode to parentId.

    12.0.0upgrade guide

  • Renames the custom node prop xPos to positionAbsoluteX.

    12.0.0upgrade guide

  • Renames the custom node prop yPos to positionAbsoluteY.

    12.0.0upgrade guide

  • Removed; use screenToFlowPosition instead.

    12.0.0upgrade guide

  • Renames updateEdge to reconnectEdge for reconnecting edges.

    12.0.0upgrade guide

  • Renames edgeUpdaterRadius to reconnectRadius.

    12.0.0upgrade guide

  • The deprecated function was removed; reconnectEdge is the replacement.

    12.0.0upgrade guide

  • Replaces the react-flow__handle-valid class for the valid handle state.

    12.0.0upgrade guide

  • The package formerly named reactflow is now @xyflow/react, with named rather than default imports; style imports also use the new package path.

    12.0.0upgrade guide

New APIs and options 28

  • Adds automatic panning when a user drags a selection close to the viewport edge.

    12.11.0release notes

  • Exports the NodeHandle type for use by developers.

    12.11.0release notes

  • screenToFlowPosition now accepts snapGrid in its options.

    12.10.2release notes

  • Adds a hook for applying middleware to node-change handling.

    12.10.0release notes

  • Adds zIndexMode to control how z-index is calculated for nodes and edges.

    12.10.0release notes

  • Adds the type property to EdgeProps, matching NodeProps behavior.

    12.9.0release notes

  • Adds the EdgeToolbar component for building toolbars associated with edges.

    12.9.0release notes

  • New prop controls the speed of auto panning.

    12.0.0upgrade guide

  • New prop toggles built-in light, dark, or system color modes; dark mode adds a dark class to the wrapper.

    12.0.0upgrade guide

  • New prop provides one validation function for all connections and is also called for programmatically added edges.

    12.0.0upgrade guide

  • Node typing now supports defining a union of node types with distinct data structures, distinguished by node.type.

    12.0.0upgrade guide

  • NodeProps now includes selectable, deletable, draggable, and parentId.

    12.0.0upgrade guide

  • New handler lets applications prevent or manage deletions.

    12.0.0upgrade guide

  • New combined handler for node and edge deletions.

    12.0.0upgrade guide

  • New callback prop for controlled viewport changes.

    12.0.0upgrade guide

  • Nodes now support an origin attribute.

    12.0.0upgrade guide

  • New prop sets the maximum mousedown/up distance that will trigger a click.

    12.0.0upgrade guide

  • New Background prop lets you style the background pattern with a class name.

    12.0.0upgrade guide

  • Edges now support a selectable attribute.

    12.0.0upgrade guide

  • Flows can be rendered on the server and hydrated on the client by defining node width, height, and handles.

    12.0.0upgrade guide

  • New helper for updating edge data.

    12.0.0upgrade guide

  • New useReactFlow function for updating nodes as part of managing data flow.

    12.0.0upgrade guide

  • New useReactFlow function for updating node data as part of managing data flow.

    12.0.0upgrade guide

  • New hook exposes the ongoing connection, including for styling handles or a custom connection line.

    12.0.0upgrade guide

  • New hook for managing data flow between connected nodes.

    12.0.0upgrade guide

  • New hook for managing data flow between nodes.

    12.0.0upgrade guide

  • Controlled viewport support adds viewport and onViewportChange props, enabling use cases such as animating the viewport.

    12.0.0upgrade guide

  • New component renders elements in the viewport without requiring a custom node.

    12.0.0upgrade guide

Performance 7

  • MiniMap no longer re-renders on every store update, improving rendering performance.

    12.11.2release notes

  • Viewport pan and zoom transforms are applied imperatively so the component renders only once.

    12.11.2release notes

  • XYDrag instances are created only for draggable nodes, reducing unnecessary runtime work.

    12.11.2release notes

  • Optimizes zooming performance when panOnScroll mode is enabled.

    12.10.1release notes

  • Prevents unnecessary updates when selectNodesOnDrag is false.

    12.10.1release notes

  • Prevents unnecessary re-renders in FlowRenderer, improving rendering efficiency.

    12.10.0release notes

  • Improves the performance of adding nodes and edges.

    12.9.0release notes

Behavior and default changes 14

  • Development now logs when a user hides attribution.

    12.11.4release notes

  • Middle-mouse viewport panning can now start from a selection rectangle.

    12.11.3release notes

  • Control can activate pane panning during a primary-button drag.

    12.11.3release notes

  • Touch panning takes precedence over drag selection when selectionOnDrag is combined with mouse-button-specific panOnDrag settings.

    12.11.3release notes

  • useKeyPress now supports key combinations containing three or more keys.

    12.11.3release notes

  • Improves the return type so the data type can be narrowed by checking the node type.

    12.10.1release notes

  • Connections now receive the current pointer position.

    12.9.3release notes

  • The default paneClickDistance value is now 1.

    12.9.3release notes

  • Selections can now be started above a node.

    12.9.0release notes

  • Most styles now use CSS variables, which users can use to customize a flow.

    12.0.0upgrade guide

  • The function now returns the deleted nodes and deleted edges.

    12.0.0upgrade guide

  • The default nodeDragThreshold is now 1 instead of 0.

    12.0.0upgrade guide

  • Library-created edges include sourceHandle only when it is set, rather than passing sourceHandle: null.

    12.0.0upgrade guide

  • Library-created edges include targetHandle only when it is set, rather than passing targetHandle: null.

    12.0.0upgrade guide

Tooling 2

  • Adds @types/react as an optional peer dependency to prevent pnpm strict-mode issues.

    12.11.0release notes

  • Adds @types/react-dom as an optional peer dependency to prevent pnpm strict-mode issues.

    12.11.0release notes

Fixes and other changes 32

  • The internal selection state is no longer mutated.

    12.12.1release notes

  • Respects nodeOrigin when passed a node object instead of { id }; getIntersectingNodes does too.

    12.12.1release notes

  • Clicking the pane cancels a pending click connection and calls onClickConnectEnd / onclickconnectend.

    12.12.1release notes

  • In EdgeProps, the type of pathOptions is inferred from the edge type instead of using any.

    12.12.1release notes

  • ResizeObservers are disconnected when a flow unmounts.

    12.12.1release notes

  • onResizeEnd now always fires after onResizeStart during resizing.

    12.12.0release notes

  • Fixes incorrect values during resize when shouldResize returns false.

    12.12.0release notes

  • Prevents the attribution warning when the pane is not rendered.

    12.11.6release notes

  • All properties in the provider store are reset when the flow unmounts.

    12.11.6release notes

  • MiniMap continues working after ReactFlow is remounted.

    12.11.4release notes

  • MiniMap no longer zooms out to include the origin when every node is hidden.

    12.11.4release notes

  • The Background pattern offset calculation is corrected.

    12.11.3release notes

  • extent: 'parent' now resolves immediately when the parent has width or initialWidth.

    12.11.3release notes

  • An error is now invoked when a handle cannot be found.

    12.11.3release notes

  • Internal setNodes now uses the correct nodeExtent.

    12.11.3release notes

  • The type now preserves its discriminated union, improving type-safe connection state handling.

    12.11.1release notes

  • Development warnings now use library-specific messages and correct documentation links.

    12.11.0release notes

  • Prevents node resizing beyond absolute extents.

    12.11.0release notes

  • Corrects the event type passed to onNodeDrag.

    12.11.0release notes

  • The type field may be omitted; omission is equivalent to type: "default".

    12.10.2release notes

  • Remounts no longer produce an empty store, improving ReactFlow state availability during remounts.

    12.10.2release notes

  • Viewport helper functions now receive options correctly when called through useReactFlow.

    12.10.2release notes

  • Visual node selection is cleared when no nodes remain selected in the flow.

    12.10.2release notes

  • Keeps isValidConnection up to date during an ongoing connection.

    12.10.1release notes

  • Handles an undefined node in the mini map.

    12.10.1release notes

  • Keeps onConnectEnd up to date during an ongoing connection.

    12.10.1release notes

  • Fixes programmatic selection issues by consolidating drag handler effects.

    12.10.1release notes

  • Ongoing connections now update when a user moves a node with the keyboard.

    12.10.0release notes

  • The selection box resets when a user selects a node.

    12.9.2release notes

  • onPaneClick events are no longer suppressed when selectionOnDrag=true.

    12.9.1release notes

  • NodeResizer props can change while a resize is in progress.

    12.9.0release notes

  • onMoveEnd is always called when onMoveStart was called.

    12.9.0release notes

@xyflow/react 1139 changes

Breaking changes 12

  • This prop was merged into defaultViewport.

    11.0.0upgrade guide

  • Use defaultViewport in place of the merged defaultPosition and defaultZoom props to set the initial viewport.

    11.0.0upgrade guide

  • This helper was removed; getBezierPath now returns the path and label position.

    11.0.0upgrade guide

  • This helper was removed; use the path helper to obtain the edge label position.

    11.0.0upgrade guide

  • Use this handler in place of onClickConnectStop.

    11.0.0upgrade guide

  • This event handler was removed; use onClickConnectEnd instead.

    11.0.0upgrade guide

  • Use this handler in place of onConnectStop.

    11.0.0upgrade guide

  • This event handler was removed; use onConnectEnd instead.

    11.0.0upgrade guide

  • React Flow 11 requires React 17 or greater.

    11.0.0upgrade guide

  • The nocss entry point has been removed; adjust CSS entry points to load the styles directly.

    11.0.0upgrade guide

  • The package react-flow-renderer was renamed to reactflow; the migration examples import ReactFlow from @xyflow/react.

    11.0.0upgrade guide

  • Import this stylesheet for default styling; CSS is no longer injected, and React Flow will not work if styles are not loaded.

    11.0.0upgrade guide

New APIs and options 20

  • Use ariaLabel options to control the default aria attributes for elements.

    11.0.0upgrade guide

  • A Cross variant is available for the background pattern.

    11.0.0upgrade guide

  • This component makes it easier to build custom edges.

    11.0.0upgrade guide

  • Nodes and edges have a deletable option.

    11.0.0upgrade guide

  • Disable keyboard accessibility controls with this prop.

    11.0.0upgrade guide

  • This edge option renders an invisible edge to make edges easier to interact with.

    11.0.0upgrade guide

  • Control the origin of a node, which is useful for layouting.

    11.0.0upgrade guide

  • Add this class name to a custom node wrapper to disable panning over the node.

    11.0.0upgrade guide

  • A new event handler for when the pointer enters the pane.

    11.0.0upgrade guide

  • A new event handler for when the pointer leaves the pane.

    11.0.0upgrade guide

  • A new event handler for pointer movement over the pane.

    11.0.0upgrade guide

  • Edge pathOptions are available for smoothstep and default edges.

    11.0.0upgrade guide

  • Background is available as a separately installable package.

    11.0.0upgrade guide

  • Controls is available as a separately installable package.

    11.0.0upgrade guide

  • Core is available as a separately installable package.

    11.0.0upgrade guide

  • Minimap is available as a separately installable package.

    11.0.0upgrade guide

  • Use this hook to handle selection changes within a component.

    11.0.0upgrade guide

  • This hook returns true if all nodes are initialized and if there is more than one node.

    11.0.0upgrade guide

  • Use this hook to handle viewport changes within a component.

    11.0.0upgrade guide

  • Import this stylesheet when you want only basic styles.

    11.0.0upgrade guide

Behavior and default changes 7

  • The cursor is grabbing while dragging a node or panning.

    11.0.0upgrade guide

  • Routing for smoothstep and step edges is improved.

    11.0.0upgrade guide

  • Edge updating behavior is improved.

    11.0.0upgrade guide

  • The helper returns the path and label position, so callers can get both from one call.

    11.0.0upgrade guide

  • Nodes and edges can be focused, selected, moved, and deleted using the keyboard.

    11.0.0upgrade guide

  • The pane can be moved using the middle mouse button.

    11.0.0upgrade guide

  • Panning over nodes is allowed when they are not draggable; add nopan to a custom node wrapper to disable this behavior.

    11.0.0upgrade guide