A directed acyclic graph for lineage and pipelines, laid out in layers with no layout library: boxes with name, meta, status and link, neutral edges, the selected node's path highlighted, arrow keys along the edges, and GraphList, the same graph as text.
API reference
Generated from the types. Every part also takes className.
Graph
- nodesrequired
GraphNode[]The boxes, in any order; they are laid out in columns from the edges.- edgesrequired
GraphEdge[]The connections,{withfrom, to } froman input ofto. An edge that would close a cycle is left out.- labelrequired
stringNames the graph for screen readers: "Lineage of Picking detector v3.2".- orientation
"horizontal" | "vertical" = "horizontal"horizontal (default): inputs on the left, outputs on the right. vertical: top to bottom, for narrow, deep pipelines.- selectedId
stringThe selected node, controlled; null for none. Pair with onSelectedChange.- defaultSelectedId
stringThe node selected at first (uncontrolled).- onSelectedChange
(id: string | null, node?: GraphNode) => voidCalled with the node selected, or null when the selection is cleared (Esc, a click on the background, the node again).- empty
ReactNode = "Nothing here yet."Shown in the frame when there are no nodes.- loading
booleanBones in the frame while the graph loads.- linkAs
ElementType = "a"Your router's link (e.g. next/link), for nodes with href.- labels
Partial<GraphLabels>
GraphList
Also takes every prop of Pick<GraphProps, "nodes" | "edges" | "label" | "empty" | "loading" | "linkAs" | "labels" | "className">.
- labelrequired
stringNames the graph for screen readers: "Lineage of Picking detector v3.2".- loading
booleanBones in the frame while the graph loads.- empty
ReactNode = "Nothing here yet."Shown in the frame when there are no nodes.- labels
Partial<GraphLabels>- nodesrequired
GraphNode[]The boxes, in any order; they are laid out in columns from the edges.- edgesrequired
GraphEdge[]The connections,{withfrom, to } froman input ofto. An edge that would close a cycle is left out.- linkAs
ElementType = "a"Your router's link (e.g. next/link), for nodes with href.