Skip to main content
Package: @xyflow/react.
Data flows through the connection
Monthly budgetUSD / month
Annual budget$3,000Monthly × 12

Annual total: $3,000. Change the monthly value, or delete the connection to stop the calculation.

Try it

Change the monthly budget. The connected annual node recalculates immediately. Select and delete the edge to stop the calculation; reconnect the handles to resume.

Code

flow-custom-nodes.tsx

Controls inside nodes

The number field uses React Flow’s nodrag class, so editing the amount does not move the node. The amount is shared through controlled node data.

Rendering

Nodes include explicit dimensions and handle positions so the diagram can render in the initial HTML. Pan, zoom, and editing become available when the component hydrates. React Flow reference.