Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →

Utils

addEdge()

The addEdge util is a convenience function to add a new edge to an array of edges. It also validates the edge so you don't add an invalid or duplicate one.

Read more

getBezierPath()

The getBezierPath util returns an SVG path for a bezier edge along with the coordinates of its label.

Read more

getSimpleBezierPath()

The getSimpleBezierPath util returns an SVG path for a simple bezier edge — a smoother curve with no control-point handles — along with its label coordinates.

Read more

getSmoothStepPath()

The getSmoothStepPath util returns an SVG path for a smooth-step (or step) edge along with the coordinates of its label.

Read more

isEdge()

The isEdge util is a type guard that returns true when a flow element is an edge.

Read more

isNode()

The isNode util is a type guard that returns true when a flow element is a node.

Read more

reconnectEdge()

The reconnectEdge util returns a new array of edges with a given edge reconnected to a new source or target, keeping the rest untouched.

Read more