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

EdgeProps

The EdgeProps type is the set of props Vue Flow passes to a custom edge component — id, source / target, the endpoint coordinates (sourceX / sourceY / targetX / targetY), positions, data, selected, and more. Declare it with defineProps<EdgeProps>().

Fields

NameTypeDefault
idstring

Unique id of an edge.

sourcestring

Id of source node.

targetstring

Id of target node.

typeEdgeType["type"]

Type of edge defined in edgeTypes.

labelstring | VNode<RendererNode, RendererElement, { [key: string]: any; }> | Component<EdgeTextProps>

The label or custom element to render along the edge. This is commonly a text label or some custom controls.

styleCSSProperties

Inline style applied to the edge path.

selectedboolean

Whether the edge is currently selected.

selectableboolean

Whether the edge can be selected.

deletableboolean

Whether the edge can be deleted.

sourceHandleIdstring | null

Id of source handle, only needed if there are multiple handles per node.

targetHandleIdstring | null

Id of target handle, only needed if there are multiple handles per node.

animatedboolean

Whether the edge path is animated.

reconnectableEdgeReconnectable

Whether the edge can be reconnected by dragging an endpoint, see EdgeReconnectable.

markerStartstring

Pre-resolved url(#…) reference for the start marker, or undefined when the edge has none.

markerEndstring

Pre-resolved url(#…) reference for the end marker, or undefined when the edge has none.

curvaturenumber

Curvature of the default bezier path, between 0 and 1.

interactionWidthnumber

The width of the invisible area around the edge that the user can interact with. This is useful for making the edge easier to click or hover over.

dataEdgeType["data"]

Arbitrary data passed to an edge.

labelStyleCSSProperties

Custom styles to apply to the label.

labelShowBgboolean

Render a background rectangle behind the label.

labelBgStyleCSSProperties

Inline style applied to the label background rectangle.

labelBgPadding[number, number]

Padding around the label inside its background, as [x, y] in pixels.

labelBgBorderRadiusnumber

Border radius of the label background, in pixels.

sourceXnumber
sourceYnumber
targetXnumber
targetYnumber
sourcePositionPosition
targetPositionPosition

Notes

  • Unlike React Flow there is no sourceNode / targetNode — resolve nodes with useInternalNode(). Handles are given as sourceHandleId / targetHandleId, and markers arrive pre-resolved as url strings.