Skip to content

Basic

The smallest useful flow: a BlowCanvas over a list of nodes and a list of edges, with the background, the control bar and the minimap. Everything here works without a line of event handling - the canvas edits the two lists in place as you drag, connect, select and delete.

this is an edge labelanimated
Node 1
Node 2
Node 3
Node 4
Arrow keys move the view, Home shows the whole flow.
bit Blow

Try it

  • Drag a node to move it; its edges follow.
  • Drag from a handle (the dot on a node's edge) to another node's handle to connect them.
  • Click a node or an edge to select it, Shift+click to add to the selection, and Shift+drag the background to box-select.
  • Press Backspace or Delete to remove what is selected; a deleted node takes its edges with it.
  • Drag the background to pan, scroll to zoom and double-click it to zoom in; the control bar's buttons zoom in, zoom out and fit the whole graph in view.
  • Click or drag in the minimap (bottom right) to move the view to that part of the graph.

How it works

  • Nodes and Edges are plain List<BlowNode> and List<BlowEdge>; the canvas adds, moves and removes items in them directly.
  • A node's Type picks the built-in look: input has only a source handle, output only a target handle, and the default has both.
  • An edge joins Source to Target by node id; Label draws text on it, Animated runs dashes along it, and MarkerEnd (on by default) gives it its arrowhead.
  • FitViewOnInit zooms the graph to fit once the nodes are measured.
  • BlowBackground, BlowControls and BlowMiniMap are add-ons placed inside the canvas. The control bar's lock button is off by default (ShowInteractive), and the minimap is Pannable by default.
An unhandled error has occurred. Reload 🗙