2026-11-17
Vue Flow 2.0
Vue Flow 2 is here, and it’s the first release under the xyflow roof! Vue Flow now lives next to React Flow and
Svelte Flow in the xyflow repository and is published as
@xyflow/vue. It is built on
@xyflow/system, the same framework-agnostic core
that powers the other two libraries. You get the same node and edge model, the same function names and the same
fixes, in a smaller and faster package.
This release contains breaking changes. Check out the migration guide for everything you
need to update when upgrading from Vue Flow 1.x (@vue-flow/core), or jump straight to the cheat
sheet.
What changes
- One package.
@xyflow/vueships every built-in component (Background,Controls,MiniMap,NodeToolbar,NodeResizer), so the separate@vue-flow/*add-ons are gone. - Separate bindings for nodes and edges.
v-model="elements"is replaced byv-model:nodesandv-model:edges. Use one-way:nodes/:edgeswith@nodes-change/@edges-changeto handle every change yourself. - Immutable nodes and edges. In-place mutations like
node.position = …are no longer tracked, which makes large flows a lot faster. Update nodes withupdateNode/updateNodeDataor replace the array. NodeandInternalNode. Your nodes stay the plain objects you passed in. Computed fields like the absolute position and the measured size live on theInternalNode, which you can get withgetInternalNode(id)oruseInternalNode(id).- A split store.
useVueFlow()returns actions, getters and event hooks, anduseVueFlowStore()gives you the reactive state. - No global registry. A flow’s store belongs to its
<VueFlow>,<VueFlowProvider>orsetupVueFlow(), so multiple flows on one page can’t collide. - Aligned API.
findNodebecomesgetNode,projectbecomesscreenToFlowPosition, edge updating becomes reconnecting,connectionModedefaults tostrictand more, matching React Flow and Svelte Flow. - Shared styles. CSS variables use the shared
--xy-*names,@xyflow/vue/style.cssis the full default theme andtheme-default.cssis gone.
New features
- Dark mode. Vue Flow follows the color mode of your site automatically. Use
forceColorModeto pin it. - A new theme. Import
@xyflow/vue/xy-theme.cssto get the theme we use for our website and examples. - Layered CSS. All styles live in
@layer xyflow, so your own styles win without!important. - Changesets.
@nodes-changeand@edges-changereceive aNodeChangesetorEdgeChangesetwith helpers to read, filter and apply changes. - Controlled viewport. Bind the viewport with
v-model:viewport. - Deleting elements. New
deleteElementsaction, anonBeforeDeleteguard and@nodes-delete/@edges-delete/@deleteevents. changeParent. Move a node to another parent without recalculating its position.- More props.
ariaLabelConfig,autoPanOnSelection,connectionDragThreshold,paneDragThreshold,selectionOnDrag, a'cross'background variant and a horizontal<Controls>orientation.
Requirements
Vue Flow 2 requires Vue >=3.5.27 and @vueuse/core v14.
npm uninstall @vue-flow/core @vue-flow/background @vue-flow/controls @vue-flow/minimap @vue-flow/node-resizer @vue-flow/node-toolbar
npm install @xyflow/vue@latestFor the full list of changes, see the release notes .
