Skip to main content

Workflow Canvas

Work in Progress

Interactive canvas for building visual AI workflow diagrams. Features drag-and-drop nodes, automatic edge routing, zoom/pan controls, mini-map, and undo/redo. Perfect for creating complex automation workflows.

Note: This component is currently under development. Some features may not work as expected. We're actively working on improvements and will update the documentation once stable.

Preview

Mini Map

Installation

Terminalbash

Usage

Reacttsx

Examples

Simple Workflow

Mini Map
tsx

Read-only Mode

Mini Map
tsx

Without Minimap/Controls

tsx

With Custom Event Handlers

Props

NameTypeDefaultDescription
initialNodes
Node[][]
initialEdges
Edge[][]
nodeTypes
Record<string, React.ComponentType<any>>
onNodesChange
OnNodesChangeCallback when nodes are added, removed, or modified
onEdgesChange
OnEdgesChangeCallback when edges are added, removed, or modified
onConnect
OnConnectCallback when two nodes are connected
readOnly
booleanfalse
showMiniMap
booleantrue
showControls
booleantrueDisplay zoom/pan controls
showBackground
booleantrue
backgroundVariant
'dots' | 'lines' | 'cross''dots'
isRTL
booleanfalse
className
stringAdditional CSS classes
fitViewOptions
FitViewOptions{ padding: 0.2 }
defaultEdgeOptions
DefaultEdgeOptions{ animated: false, type: 'smoothstep' }

Accessibility

Keyboard Navigation

  • Arrow Keys: Pan the canvas when a node is not selected
  • + / -: Zoom in/out
  • Delete: Delete selected nodes or edges
  • Ctrl/Cmd + A: Select all nodes

Mouse Interactions

  • Click and drag nodes to move them
  • Click handles to create connections
  • Scroll to zoom in/out
  • Click and drag canvas to pan

Screen Reader

The canvas provides semantic structure for nodes and connections. Each node is focusable and announces its type and label to screen readers.

RTL Support

The workflow canvas automatically adjusts for RTL layouts. Node connections flow from right to left, and handle positions are mirrored appropriately.

Left-to-Right (LTR)

Right-to-Left (RTL)

Related Components

Workflow Node

Base node component for workflows

Card

Container component used in nodes

Badge

Status and label indicators