Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →
ReferenceTypes

ConnectionState

The ConnectionState type describes an in-progress connection: the from / to handles and nodes, the pointer position, and whether it isValid. When no connection is being made, inProgress is false and the other fields are null. Read it with useConnection().

Fields

NameTypeDefault
inProgressboolean

Indicates whether a connection is currently in progress.

isValidboolean | null

If an ongoing connection is above a handle or inside the connection radius, this will be true or false, otherwise null.

fromXYPosition | null

Returns the xy start position in flow coordinates or null if no connection is in progress.

fromHandleHandleBounds | null

Returns the start handle or null if no connection is in progress.

fromPositionPosition | null

Returns the side (called position) of the start handle or null if no connection is in progress.

fromNodeNodeType | null

Returns the start node or null if no connection is in progress.

toXYPosition | null

Returns the xy end position in flow coordinates or null if no connection is in progress.

toHandleHandleBounds | null

Returns the end handle or null if no connection is in progress.

toPositionPosition | null

Returns the side (called position) of the end handle or null if no connection is in progress.

toNodeNodeType | null

Returns the end node or null if no connection is in progress.

pointerXYPosition | null

Returns the pointer position relative to the pane, in screen coordinates, or null if no connection is in progress.