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

Edge<EdgeData, EdgeType>

An Edge is the complete description with everything Vue Flow needs to know in order to render it.

Fields

NameTypeDefault
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.

markerStartEdgeMarkerType

Set the marker on the beginning of an edge.

markerEndEdgeMarkerType

Set the marker on the end of an edge.

reconnectableEdgeReconnectable

Determines whether the edge can be updated by dragging the source or target to a new node. This property overrides the default set by the edgesReconnectable prop on the <VueFlow /> component.

focusableboolean

Disable/enable focusing edge (a11y)

classClassValue

Additional class names

styleStyles

Additional styles

domAttributesOmit<SVGAttributes, "id" | "style" | "className" | "role" | "aria-label" | "onClick" | "onMouseenter" | "onMousemove" | "onMouseleave" | "onContextmenu" | "onDblclick" | "onKeyDown">

General escape hatch for adding custom attributes to the edge’s DOM element.

idstring

Unique id of an edge.

typeType | "smoothstep" | "default"

Type of edge defined in edgeTypes.

sourcestring

Id of source node.

targetstring

Id of target node.

sourceHandlestring | null

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

targetHandlestring | null

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

animatedboolean
hiddenboolean
deletableboolean
selectableboolean
dataData

Arbitrary data passed to an edge.

selectedboolean
zIndexnumber
ariaLabelstring
interactionWidthnumber

ReactFlow renders an invisible path around each edge to make them easier to click or tap on. This property sets the width of that invisible path.

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.