Concrete
diagram
Component

Diagram canvas

Interactive explainer canvas with DOM nodes, supporting items, SVG edges, pan, zoom, fit, and minimap.

Diagram canvas is the editorial counterpart to FlowDiagram. It explains ideas and relationships, not product graph persistence.

Request flow

Editorial explainer graph for request routing, context, model synthesis, and streamed output.

Playground

Props in the URL.

Controls update query params directly. Complex slots use curated fixtures so component states stay deterministic, linkable, and screenshot-ready.

Loading playground.
States

Rendered matrix.

Every state maps to the same component render route through the `state` query param.

Request flow

Editorial explainer graph for request routing, context, model synthesis, and streamed output.

Default

Request-flow explainer with nodes, items, and labels.

/render state

Request flow

Editorial explainer graph for request routing, context, model synthesis, and streamed output.

Selected

Selected node, item, and edge states.

/render state

Request flow

Editorial explainer graph for request routing, context, model synthesis, and streamed output.

Interactive

Pan, zoom, fit controls, and minimap enabled.

/render state

Request flow

Editorial explainer graph for request routing, context, model synthesis, and streamed output.

Compact

Smaller educational composition.

/render state
Props

Public contract.

NameTypeDefaultDescription
graph *DiagramCanvasGraph-Validated nodes, items, and routed edges.
title *string-Diagram title.
descriptionstring-Muted supporting copy.
selectedIdstring-Highlights a node, item, or edge.
controlsbooleantrueShows zoom and fit controls.
minimapbooleanfalseShows a small node overview map.
pannablebooleantrueAllows local pan interaction.
zoomablebooleantrueAllows local zoom interaction.
heightnumber360Canvas stage height.
widthnumber1000Canvas design coordinate width.
onSelectionChange(selectedId: string) => void-Receives local node, item, or edge selection.
onViewportChange(viewport: DiagramViewport) => void-Receives pan and zoom changes.