flow is a canvas of nodes and edges that pans and zooms: any markup is a node, an edge is a record. The kit's Canvas, Node, Panel, Controls and Toolbar are AI Elements' workflow components over it. The positions stay the page's own data.
The components
A workflowDrag a node; drag from a dot on a right edge to another node to connect; click to select, Delete to remove. The wheel pans, pinch or Ctrl+wheel zooms, a drag on the background selects.
StartInitialize workflow
Triggered by a user at 09:30
Status: ready
Process dataTransform input
Validating 1,234 records
Duration: about 2.5 s
Success pathHandle success
1,156 records passed (93.7%)
Next: production
Error pathHandle errors
78 records failed (6.3%)
Next: review
Positions
start0, 40
process330, 40
ok660, -90
bad660, 170
4 nodes
3 edges
unlocked
lockedAlso the lock in Controls
selected
nothing
view (x, y, zoom)
fitting
last change
Nothing yet: drag a node.
Edges are dataThere is no Edge component: an edge is a record in edges. kind draws its line; animated is Edge.Animated, dashed is Edge.Temporary.
animated
dashed
arrow
label
color
bezier
target
smoothstep
target
step
target
straight
target
Panel, Controls, Toolbar, FlowControlButtonA Panel stays put in one of six places. Controls is four FlowControlButtons in a Panel; build your own bar from them. A Toolbar floats beside the node it is for while that node is selected or under the pointer.
Controls position
Toolbar side
Hover or select meMy toolbar is on the bottom
And meMine too
side="bottom"
side="bottom"
top-left
top-right
bottom-center
bottom-right
The element
flow, with plain markupEvery child with an id, data-x and data-y is a node. data-handle marks a connection point (data-handle-id names it, and an edge's fromHandle picks it); data-panel an overlay; data-nodrag a part that does not drag. zoom, x, y and locked are written back.
zoom 1.00
x 40 · y 40
locked
A node of plain markupdata-nodrag: this strip does not drag
Yes
No
3 nodes · 2 edges
change: 0 heard
movedrag a node
selectclick a node or an edge
connectdrag from a coloured dot to a pill
removeselect, then Delete
viewpan or zoom
A page that does not write a move down gets the node back where it was; the same for connect and remove: nothing changes until the page changes its lists.