Skip to content

useLabelEdgeHover

useLabelEdgeHover(__namedParameters): object

Tracks hover state for a single edge across both its line and its label (which live in different React subtrees) and returns the resolved style

  • handlers a custom edge component should bind.

Suppresses hover while another edge is mid-segment-drag so the visual doesn’t flicker. Reach for it when authoring a custom edge type that wants the same hover feel as the built-in LabelEdge.

UseLabelEdgeHoverParams

object

hovered: boolean

onMouseEnter: () => void = handleMouseEnter

void

onMouseLeave: () => void = handleMouseLeave

void

style: object

stroke: string

strokeWidth: string

transition: string