Workflow canvas
Connected steps you can move, inspect and follow as work flows through them.
Used forAutomation run viewsAI agent pipelinesData pipeline statusProcess maps
Install with the shadcn CLI
Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/workflow-canvas.json. More
Templates
Need the whole page?
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.
Where it’s used
Automation run views
Show a workflow’s steps and which one is running.
AI agent pipelines
Draw the stages of an agent’s work, with failures kept visible.
Data pipeline status
Sources, transforms and destinations with their current state.
Process maps
Explain how a process works in docs and dashboards.
What it handles for you
How work flows through steps is hard to show in a table. This draws the steps on a canvas and shows each one’s state as it runs. It is a viewer, not an editor: your application owns the execution.
Nodes you can move
Dragging a node moves its connections with it, and the final position is reported so you can save it.
Pan, zoom and fit
Drag the background to pan, zoom about the centre, or press Fit to see the whole workflow.
State from your application
Queued, running, complete and error. Running steps receive travelling pulses and failures stay visible with their context.
Inspect any node
Select a node and a details panel opens below the canvas without shifting it.
Keyboard and screen readers
Tab reaches every node, arrows move focus, Alt with the arrows moves a node, and status changes are announced.
A viewer by design
It does not run or edit the workflow. Your application owns execution, retries and validation.
Overview
A compact canvas for showing how work gets done. Nodes sit on a quiet dot grid, connected by rounded paths. Drag a node and its connections follow in the same coordinate space; drag the background to pan, zoom around the centre, or fit the whole workflow. Select a node to inspect its details. Execution states come from your application: completed steps leave a coloured trail, running steps receive travelling pulses, and failures stay visible with their context.
States
- ready / queued
- Each node shows its title, subtitle and state indicator. Connections stay quiet until their source has completed.
- running
- The node’s outline gains colour and a pulse travels down incoming connections from completed steps. Pulses pause offscreen and in hidden tabs.
- complete / error
- Completion resolves to a check and leaves a fine coloured connection. Failure uses an error indicator and keeps the node’s details available.
- move
- Dragging updates a node and all attached SVG paths directly, in canvas coordinates. The final position is reported on release; cancellation restores it.
- pan / zoom
- Nodes and paths share one transform. Zoom stays centred on the viewport; Fit shows the full canvas with padding.
- inspect
- A details panel opens below the canvas and measures its content height. Selecting another node updates the panel without shifting the canvas.
Usage
Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.
Works with
Drive it from your application
The component displays the state you provide. Connect your runner or event stream to node statuses, and persist positions after a drag.
Props
- nodes
- WorkflowNode[]
- Unique id, title and x/y canvas coordinates. Optional subtitle, icon, status and detail. Nodes measure 164 × 78px.
- edges
- { id: string; from: string; to: string }[]
- Unique connection IDs and source/destination node IDs. Missing endpoints are ignored.
- width / height= 660 / 340
- number
- Canvas bounds in CSS pixels before zoom. Viewport height is 300px.
- label= Workflow
- string
- Region label and visible canvas heading.
- onNodeMove
- (id: string, position: { x: number; y: number }) => void
- Final coordinates after a committed drag. Persist these in your application.
- onNodeSelect
- (id: string | null) => void
- The inspected node ID, or null when its details close.
- className
- string
- Additional root classes. Standard div attributes are forwarded.
Accessibility and motion
- Nodes are real buttons. Tab reaches every node and control; arrows move focus in supplied reading order. Alt + arrows move a node by 12 canvas pixels. Enter or Space opens details; Escape closes details or cancels a drag.
- Status uses text and icons as well as colour. Running, completion and error updates are announced in a polite live region.
- Reduced motion removes connection pulses, spinning indicators and eased viewport/panel transitions. Direct manipulation stays attached to the pointer.
- The canvas owns touch gestures inside its bounds. The initial zoom stays at least 85% for legibility; on narrow screens, pan to reach other nodes or use Fit for an overview. Focusing a node brings it into view.
- Node positions are remembered locally after dragging. onNodeMove lets you persist them. Remount with a new key to reset a moved layout.
- This is a workflow viewer, not a graph execution engine or connection editor. Your application owns execution, retries and data validation.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
The CLI also installs Number roll, Text morph.
Source
Registry item: /r/workflow-canvas.json


