Components
Flow
ExperimentalExperimental — the contract and the rendering can change without notice. Own the installed copy before shipping it.Node graph editor parts that skin React Flow with Control UI tokens.
Composition
Node graph
- <Flow>
- <FlowBackground />
- <FlowPanel>
- toolbar
- <FlowControls />
- custom node type
- <FlowNode>
- <FlowHandle />
- <FlowNodeHeader />
- <FlowNodeBody />
- <FlowNode>
- custom edge type
- <FlowEdge />
- <FlowEdgeLabel>
- <FlowEdgeLabelChip />
Installation
The Control UI source installs this primitive from src/registry/sources/control-ui/ui/flow.tsx.
Dependencies
Canvas grid
src/registry/lib/canvas-grid.tsUtilMotion
Buttonsrc/registry/lib/motion.tsUtilbuttonPrimitiveRaw code
Primary installed source
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-flow-* · 27 knobsHow the cascade resolves--cui-flow-background<color>var(--canvas)--cui-flow-grid-dot-color<color>var(--canvas-grid-dot)--cui-flow-edge-stroke<color>oklch(from var(--muted-foreground) l c h / 0.6)--cui-flow-selected-edge-stroke<color>var(--primary)--cui-flow-edge-size<length-percentage>1.5px--cui-flow-node-background<color>var(--card)--cui-flow-node-foreground<color>var(--card-foreground)--cui-flow-node-border-color<color>var(--border)--cui-flow-node-hover-border-color<color>oklch(from var(--foreground) l c h / 0.2)--cui-flow-node-selected-border-color<color>var(--primary)--cui-flow-node-border-width<length>var(--control-rim-width)--cui-flow-node-radius<length-percentage>var(--radius-lg)--cui-flow-node-shadow*var(--shadow-sm)--cui-flow-handle-size<length-percentage>calc(var(--spacing) * 2)--cui-flow-handle-background<color>var(--background)--cui-flow-handle-border-color<color>var(--muted-foreground)--cui-flow-handle-border-width<length>var(--control-rim-width)--cui-flow-edge-label-background<color>var(--background)--cui-flow-edge-label-foreground<color>var(--muted-foreground)--cui-flow-edge-label-border-color<color>var(--border)--cui-flow-edge-label-border-width<length>var(--control-rim-width)--cui-flow-controls-item-radius<length-percentage>min(var(--radius-sm), calc(var(--control-h-sm) / 2))--cui-flow-controls-padding<length-percentage>calc(var(--spacing) * 1)--cui-flow-controls-radius<length-percentage>calc(
var(--cui-flow-controls-item-radius) +
clamp(0px, calc(var(--cui-flow-controls-item-radius) * 1000), var(--cui-flow-controls-padding))
)--cui-flow-controls-background<color>var(--card)--cui-flow-controls-border-color<color>var(--border)--cui-flow-controls-shadow*var(--shadow-sm)