Skip to main content

avoidAreas

Extra rectangular obstacles (in graph coordinates) the edge routes around, in addition to nodes.

TypeAvoidArea[] (Rect from @xyflow/react)
Defaultundefined

Each entry: { x, y, width, height }. Uses the same nodePadding clearance as nodes.

import type { AvoidArea } from "@tisoap/react-flow-smart-edge";

const avoidAreas: AvoidArea[] = [{ x: 260, y: 120, width: 150, height: 170 }];

createSmartEdge("bezier", { avoidAreas });

See Avoiding custom areas for static vs dynamic usage.