Connection
Connection params that are passed whenonConnect is called.
Source node id
Target node id
Source handle id
Target handle id
Example
NodeConnection
Connection with an associated edge id.Connector
Function type for custom connection handlers.false to prevent the connection, or return connection params merged with edge properties.
Example
ConnectionStatus
Status of a connection in progress.OnConnectStartParams
Parameters passed when a connection is initiated.Source handle id
Source node id
Source handle type (
'source' or 'target')ConnectionMode
Connection mode enum determining handle behavior.- Strict: Connections can only be made from source handles to target handles
- Loose: All handles are treated as source handles, allowing more flexible connections
ConnectionLineType
Enum for connection line visual types.ConnectionLineOptions
Configuration options for the connection line.Visual type of the connection line
Custom styles for the connection line
CSS class for the connection line
Marker at the start of the connection line
Marker at the end of the connection line
Example
ConnectionLineProps
Props passed to custom connection line components.Source X position of the connection line
Source Y position of the connection line
Source position of the connection line
Target X position of the connection line
Target Y position of the connection line
Target position of the connection line
The source node of the connection line
The source handle element (not the DOM element)
The target node of the connection line (null while dragging)
The target handle element (null while dragging)
Marker URL for start
Marker URL for end
Status of the connection (valid or invalid)
HandleElement
Represents a handle element in the flow.Handle identifier
Position of the handle
Type of handle (
'source' or 'target')Node id this handle belongs to
X coordinate
Y coordinate
Handle width
Handle height
ConnectionLookup
Map structure for fast connection lookups.- First key: node id
- Second key: handle id
- Value:
NodeConnectionobject
Example Usage
ConnectionInProgress
Represents an active connection being dragged.Always true for active connections
Whether the connection is valid, invalid, or not yet determined
Start position
Source handle
Source node
Current cursor position
Target handle (null if hovering over nothing)
Target node (null if hovering over nothing)