Skip to main content

Workflow Canvas

Work in Progress

Canvas component for building node-based workflows with drag-and-drop, pan/zoom, minimap, and controls. Perfect for automation builders.

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[][]Initial nodes for the workflow
initialEdges
Edge[][]Initial edges/connections between nodes
nodeTypes
Record<string, React.ComponentType<any>>Custom node type components
onNodesChange
OnNodesChangeCallback when nodes change (move, select, delete)
onEdgesChange
OnEdgesChangeCallback when edges change
onConnect
OnConnectCallback when nodes are connected
readOnly
booleanfalseWhether the canvas is read-only (no editing)
showMiniMap
booleantrueShow the minimap navigation
showControls
booleantrueShow zoom and fit view controls
showBackground
booleantrueShow background pattern
backgroundVariant
'dots' | 'lines' | 'cross''dots'Background pattern variant
isRTL
booleanfalseWhether text direction is RTL
className
stringAdditional CSS classes
fitViewOptions
FitViewOptions{ padding: 0.2 }Options for fitting the view
defaultEdgeOptions
DefaultEdgeOptions{ animated: false, type: 'smoothstep' }Default options for edges

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 Considerations

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

LTR (English)

RTL (العربية)

Related Components

Workflow Node

Base node component for workflows

Card

Container component used in nodes

Badge

Status and label indicators