Review workflow
Drag the nodes, connect their handles, or use the form. Select a node to reveal its actions.
An interactive graph with draggable nodes, connections, viewport controls, anchored panels, and node actions.
Drag the nodes, connect their handles, or use the form. Select a node to reveal its actions.
Drag the nodes, connect their handles, or use the form. Select a node to reveal its actions.
npm install @noorddev/vlak-react @xyflow/react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import "@noorddev/vlak-react/workflow.css";
import { WorkflowCanvas, WorkflowControls, WorkflowPanel, type WorkflowGraphNode } from "@noorddev/vlak-react/components/workflow-canvas";Per-component imports are available at @noorddev/vlak-react/components/workflow-canvas.
npx @noorddev/vlak-cli add workflow-canvas
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.
npx shadcn add https://vlak.dev/r/workflow-canvas.json
Installs the same source through the shadcn CLI.
"use client";
import "@noorddev/vlak-react/workflow.css";
import { addEdge, useNodesState, useEdgesState, type Edge } from "@xyflow/react";
import { WorkflowCanvas, WorkflowControls, WorkflowPanel, type WorkflowGraphNode } from "@noorddev/vlak-react/components/workflow-canvas";
export function ReviewWorkflow() {
const [nodes, , onNodesChange] = useNodesState<WorkflowGraphNode>([
{ id: "brief", type: "vlak", position: { x: 0, y: 0 }, data: { title: "Read brief", target: false } },
{ id: "review", type: "vlak", position: { x: 380, y: 0 }, data: { title: "Review", source: false } },
]);
const [edges, setEdges, onEdgesChange] = useEdgesState<Edge>([]);
return <WorkflowCanvas nodes={nodes} edges={edges} onNodesChange={onNodesChange} onEdgesChange={onEdgesChange}
onConnect={connection => setEdges(current => addEdge({ ...connection, type: "vlak" }, current))}>
<WorkflowControls />
<WorkflowPanel position="top-left">Review workflow</WorkflowPanel>
</WorkflowCanvas>;
}See the integration example to compose these components with your application's model and data.
Optional React Flow adapter. Supply a bounded height and controlled changes or defaultNodes/defaultEdges.
Pointer-following connection preview while creating an edge.
Binds Vlak's canvas controls to the graph viewport and interaction lock.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | "Workflow controls" |
Bezier edge with engine-managed hit testing and optional temporary or animated state.
A graph node surface. Render inside React Flow so its handles use the graph's geometry.
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | ||
description | ReactNode | ||
footer | ReactNode | ||
actions | ReactNode | ||
source | boolean | true | |
target | boolean | true | |
sourcePosition | Position | Position.Right | |
targetPosition | Position | Position.Left | |
selected | boolean | false | |
connectable | boolean | true |
Also accepts Omit<HTMLAttributes<HTMLDivElement>, "title">.
The ref reaches HTMLDivElement.
Overlay anchored to one of React Flow's six viewport positions.
Node-anchored toolbar with Vlak's arrow-key action navigation.
| Prop | Type | Default | Description |
|---|---|---|---|
actionsrequired | ToolbarAction[] | ||
labelrequired | string |
| Keys | Does |
|---|---|
| Tab | Focuses nodes, edges, viewport controls, and supplied actions |
| Enter, Space | Selects a focused node or edge through React Flow |
| Arrow keys | Moves a selected, draggable node; moves between actions inside the node toolbar |
| Delete, Backspace | Deletes selected graph elements through the supplied change callbacks |
| Escape | Cancels the current graph selection or connection gesture |
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.
npm install @noorddev/vlak
import "@noorddev/vlak/css";
<section class="rs-workflow-canvas" aria-label="Workflow"><div class="rs-workflow-canvas-node"><header class="rs-workflow-canvas-header"><div class="rs-workflow-canvas-title">Review brief</div></header><div class="rs-workflow-canvas-content">Summarize the supplied document.</div></div></section>