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

DefaultEdgeOptions

The DefaultEdgeOptions type is the set of Edge properties applied to every newly created edge — type, animated, style, markers, and so on. Pass it via the defaultEdgeOptions prop so you don’t repeat them on each edge.

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.

typestring

Type of edge defined in edgeTypes.

animatedboolean
hiddenboolean
deletableboolean
selectableboolean
dataRecord<string, unknown>

Arbitrary data passed to an edge.

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.