@vue-flow/pathfinding-edge

__Custom edge that avoids crossing nodes__
128,023 6,913
Install
npm install @vue-flow/pathfinding-edge
Latest Version:1.0.6
Vue:3
License:MIT
Last Updated:Jul 14, 2026
Links: GitHub  ·  npm
Maintainer: braks

Vue Flow Pathfinding Edge 🧲

Custom edge that avoids crossing nodes

🛠 Setup

# install
$ yarn add @vue-flow/pathfinding-edge

# or
$ npm i --save @vue-flow/pathfinding-edge

🎮 Quickstart

<script setup>
import { VueFlow, useVueFlow } from '@vue-flow/core'
import { PathFindingEdge } from '@vue-flow/pathfinding-edge'
import initialElements from './initial-elements'

const elements = ref(initialElements)

// create a new context so we can fetch nodes
const { getNodes } = useVueFlow()
</script>
<template>
  <div style="height: 300px">
    <VueFlow v-model="elements">
      <template #edge-pathfinding="props">
        <PathFindingEdge v-bind="props" :nodes="getNodes" />
      </template>
    </VueFlow>
  </div>
</template>
// initial-elements.js
export default [
  {
    id: 'e12',
    source: '1',
    target: '2',
    label: 'Smart Edge',
    style: { stroke: 'red' },
    // assign pathfinding edge type
    type: 'pathfinding'
  },
  {
    id: '1',
    label: 'Node 1',
    position: {
      x: 430,
      y: 0,
    },
  },
  {
    id: '2',
    label: 'Node 2',
    position: {
      x: 230,
      y: 90,
    },
  },
]

Related Packages

@vue-flow/background

This is a background component for Vue Flow. It can be used to create a backgrou...

8,790,989 6,920
@vue-flow/controls

This is a control component for Vue Flow. It can be used to control the canvas i...

7,056,601 6,920
@vue-flow/minimap

This is a minimap component for Vue Flow. It can be used to add a minimap to the...

5,867,081 6,920
@vue-flow/node-resizer

This is a resizer component for Vue Flow. It can be used to resize your nodes.

3,424,741 6,920

Version History

Version Released License
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT