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
| Name | Type | Default |
|---|---|---|
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. | |
markerStart | EdgeMarkerTypeSet the marker on the beginning of an edge. | |
markerEnd | EdgeMarkerTypeSet the marker on the end of an edge. | |
reconnectable | EdgeReconnectableDetermines whether the edge can be updated by dragging the source or target to a new node. This
property overrides the default set by the | |
focusable | booleanDisable/enable focusing edge (a11y) | |
class | ClassValueAdditional class names | |
style | StylesAdditional styles | |
domAttributes | Omit<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. | |
type | stringType of edge defined in | |
animated | boolean | |
deletable | boolean | |
selectable | boolean | |
data | Record<string, unknown>Arbitrary data passed to an edge. | |
zIndex | number | |
ariaLabel | string | |
interactionWidth | numberReactFlow 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. | |
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. |