ConnectionLineComponentProps
If you want to render a custom component for connection lines, you can set the
connectionLineComponent prop on the <ReactFlow />
component. The ConnectionLineComponentProps are passed to your custom component.
export type ConnectionLineComponentProps = {
connectionLineStyle?: React.CSSProperties;
connectionLineType: ConnectionLineType;
fromNode?: Node;
fromHandle?: Handle;
fromX: number;
fromY: number;
toX: number;
toY: number;
fromPosition: Position;
toPosition: Position;
connectionStatus: 'valid' | 'invalid' | null;
};Props
| Name | Type | Default |
|---|---|---|
connectionLineStyle | CSSProperties | |
connectionLineType | ConnectionLineType | |
fromNode | InternalNode<NodeType>The node the connection line originates from. | |
fromHandle | HandleThe handle on the | |
fromX | number | |
fromY | number | |
toX | number | |
toY | number | |
fromPosition | Position | |
toPosition | Position | |
connectionStatus | "valid" | "invalid" | nullIf there is an | |
toNode | InternalNode<NodeType> | null | |
toHandle | Handle | null |
Last updated on