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
| Name | Type | Default |
|---|---|---|
id | stringUnique id of an edge. | |
source | stringId of source node. | |
target | stringId of target node. | |
type | EdgeType["type"]Type of edge defined in | |
label | string | 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. | |
style | CSSPropertiesInline style applied to the edge path. | |
selected | booleanWhether the edge is currently selected. | |
selectable | booleanWhether the edge can be selected. | |
deletable | booleanWhether the edge can be deleted. | |
sourceHandleId | string | nullId of source handle, only needed if there are multiple handles per node. | |
targetHandleId | string | nullId of target handle, only needed if there are multiple handles per node. | |
animated | booleanWhether the edge path is animated. | |
reconnectable | EdgeReconnectableWhether the edge can be reconnected by dragging an endpoint, see EdgeReconnectable. | |
markerStart | stringPre-resolved | |
markerEnd | stringPre-resolved | |
curvature | numberCurvature of the default bezier path, between 0 and 1. | |
interactionWidth | numberThe 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. | |
data | EdgeType["data"]Arbitrary data passed to an edge. | |
labelStyle | CSSPropertiesCustom styles to apply to the label. | |
labelShowBg | booleanRender a background rectangle behind the label. | |
labelBgStyle | CSSPropertiesInline style applied to the label background rectangle. | |
labelBgPadding | [number, number]Padding around the label inside its background, as | |
labelBgBorderRadius | numberBorder radius of the label background, in pixels. | |
sourceX | number | |
sourceY | number | |
targetX | number | |
targetY | number | |
sourcePosition | Position | |
targetPosition | Position |
Notes
- Unlike React Flow there is no
sourceNode/targetNode— resolve nodes withuseInternalNode(). Handles are given assourceHandleId/targetHandleId, and markers arrive pre-resolved as url strings.