FlowEditor
Organism
A node-graph editor: cards placed freely on a pannable, zoomable canvas, joined by directed edges. Use it to let people shape a process, such as a delivery workflow whose edges carry conditions. The application owns the graph; FlowEditor draws the nodes and edges it is given and reports what the user asked for (onMoveNode, onConnect, onAddNode, onDelete, onSelectionChange).
Playground
Every control sets a real prop of FlowEditorProps. The JSX below updates as you go.
Web
iOS
Android
JSX · FlowEditorProps
Variants
2 examples from src/organisms/flow-editor/flow-editor.md, each rendered live from its own JSX.
Anatomy
1
Toolbar
2
Canvas
3
Node
4
Port
5
Edge
6
Edge label
Dimmed parts appear only in some states or variants.
Props
14 props on FlowEditorProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Tab
Shift+Tab
Moves between the toolbar, the canvas and each card
Arrow keys
Move the focused card one grid step
Delete
Backspace
Removes the selected card or edge
+
-
Zooms the canvas in or out
0
Fits the whole graph in view
Semantics
Roles
button
States
selected
ARIA on web
aria-hidden
aria-label
aria-pressed
From the docs
Every pointer action has a keyboard and screen-reader path. Each card is a focusable button named by its title, description, agent line, attention reason and incoming and outgoing connections. Each connection names its source and destination, its label when provided, and whether it is a rework edge; isolated cards announce no connections in either direction. These names follow graph updates and remain available in readOnly mode. Edges with a missing source or destination are omitted, just as they are from the drawing.
Cards announce selection (pressed state on the web); Enter or Space selects a focused card. In editable mode, the arrow keys move a focused card one grid step and Delete removes it, and VoiceOver and TalkBack offer the same as named actions (move left, right, up and down, delete). Read-only cards retain selection without editing actions. The toolbar's From and To selects with Connect join two cards without dragging a port; when the two are joined already the button reads Disconnect and removes that edge, the keyboard path to an edge. Each palette entry adds its node in view when pressed. The canvas itself takes focus: plus and minus zoom and 0 fits the graph. Edges are selected by pressing them or their label; Delete removes the selection in editable mode.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
Drag a card to move it (it snaps to the grid on release), drag from a card's right-hand port onto another card to connect them, and drag a palette entry onto the canvas to add a node. Drag the background to pan; the wheel, a pinch or the toolbar zoom buttons zoom, and Fit shows the whole graph. A rework edge, one that returns work upstream, is drawn dashed.
Who acts on a card
A node's optional agent is a compact third line naming who acts on the card, such as a role and its skill count. The card keeps its size: its padding tightens when the line is shown. A node's optional attention is the reason the card needs attention: it draws a warning mark in the card's top-right corner, and the card's accessible name ends with "needs attention:" and the reason. The mark is not interactive; the application shows the detail, for example in an inspector.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
background
border
card
field-border
foreground
input
muted-foreground
primary
ring
subtle-foreground
surface-sunken
warning