Reference
EdgeProps

EdgeProps<T>

Source on GitHub (opens in a new tab)

When you implement a custom edge it is wrapped in a component that enables some basic functionality. Your custom edge component receives the following props:

export type EdgeProps<T> = {
  id: string;
  animated: boolean;
  data: T;
  style: React.CSSProperties;
  selected: boolean;
  source: string;
  target: string;
  sourceHandleId?: string | null;
  targetHandleId?: string | null;
  interactionWidth: number;
  sourceX: number;
  sourceY: number;
  targetX: number;
  targetY: number;
  sourcePosition: Position;
  targetPosition: Position;
  label?: string | React.ReactNode;
  labelStyle?: React.CSSProperties;
  labelShowBg?: boolean;
  labelBgStyle?: CSSProperties;
  labelBgPadding?: [number, number];
  labelBgBorderRadius?: number;
  markerStart?: string;
  markerEnd?: string;
  pathOptions?: any;
};

Fields

#id
string
#animated
boolean
#data
T
#style
#selected
boolean
#source
string
#target
string
#sourceHandleId?
string | null
#targetHandleId?
string | null
#interactionWidth
number
#sourceX
number
#sourceY
number
#targetX
number
#targetY
number
#sourcePosition
#targetPosition
#label?
string | React.ReactNode
#labelStyle?
#labelShowBg?
boolean
#labelBgStyle?
#labelBgPadding?
[number, number]
#labelBgBorderRadius?
number
#markerStart?
string
#markerEnd?
string
#pathOptions?
any