Skip to Content
Svelte Flow 2 is out! Read the announcement →

2026-11-18

Svelte Flow 2.0.0

Major Changes

  • #6114  - Align the connection APIs across all frameworks on NodeConnection.
    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6082  - Removed setters from useNodes and useEdges in favor of better change handling via updateNode & updateEdge in useSvelteFlow.
  • #6117  - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates
  • #5965  - Removed useColorMode hook.
  • #5915  - Remove requirement of parent nodes to appear before child nodes in the nodes array
  • #5927  - Use 5% as new default padding for fitView, and fitBounds.
  • #6115  - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.
  • #5843  - Use system color mode by default, add forceColorMode to opt-out.
  • #5556  - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.
  • #5987  - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.
  • #5927  - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)
  • #5944  - Pass NodeChangeset/EdgeChangeset class to onNodesChange/onEdgesChange or onnodeschange/onedgeschange.
  • #5967  - Rename useStore to useSvelteFlowStore
  • #5842  - Hooks do not require to be $derived anymore and accept a function parameter instead.

Minor Changes

  • #5866  - Add style import from @xyflow/svelte/style.css.
  • #5939  - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.
  • #6082  - Control and monitor any changes to your nodes & edges via onnodeschange & onedgeschange. Clearing a changeset with changes.clear() in onnodeschange prevents automatic application of changes. Use it to manually manage changes to nodes & edges.
  • #5844  - Exported styles now live in @layer xyflow.
  • #6029  - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.
  • #5993  - Add xy-theme.css stylesheet (@xyflow/svelte/xy-theme.css) that ships the xyflow default theme on top of base.css.
  • #5939  - Add useNode and useEdge hooks for subscribing to changes to specific nodes & edges

Patch Changes

  • #5866  - Include source maps and src folder in package. “Go to definition” now links to the source code instead of the generated types
  • #6064  - Stop an interrupted animated fitView from running again on every later nodes change, for example while dragging a node
  • #6084  - Fix resizing nodes with a fixed extent & a non-default origin.
  • #6115  - Fire the pane context menu event when right-click panning is enabled (panOnDrag includes 2).
  • #5989  - Prevent jumping nodes when origin node option is used
  • #6064  - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending
  • #6131  - Narrow data by type when NodeProps receives a union of node types.
  • #5996  - Performance: Optimize processing of nodes & edges

Get Pro examples, prioritized bug reports, 1:1 support from the maintainers, and more with Svelte Flow Pro