Rebar UI

1.0

opinion

NodeLinkGraph

An SVG canvas of nodes and edges you can pan and zoom, with hierarchical, circular or manual layout.

Studio structureWho leads which project
Two nodes
No nodes

In context

Studio mapThe structure beside a project's details
Who leads whatTideline, October
On track
Harbour rebrandBrand
MC

Led by Maya Chen, due 24 Oct

84% done

Props

PropTypeRequiredDefault
nodesNodeLinkGraphNode[]Yes—
edgesNodeLinkGraphEdge[]Yes—
layout"hierarchical" | "circular" | "manual" | undefinedNohierarchical
titlestring | undefinedNo—
ariaLabelstring | undefinedNo—
widthnumber | undefinedNo480
heightnumber | undefinedNo360
paddingnumber | undefinedNo24
onNodePositionChange((id: string, x: number, y: number) => void) | undefinedNo—
onViewportChange((view: { nodes: { id: string; x: number; y: number; }[]; viewportBounds: { x: number; y: number; width: number; height: number; }; }) => void) | undefinedNo—
renderNode((node: Required<Pick<NodeLinkGraphNode, "label" | "id" | "x" | "y">> & NodeLinkGraphNode) => ReactNode) | undefinedNo—
renderEdgeStyle((edge: NodeLinkGraphEdge) => { stroke?: string | undefined; strokeWidth?: number | undefined; } | undefined) | undefinedNo—
classNamestring | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

data-rebar-* attributes

data-rebar-component="node-link-graph"; parts: toolbar, zoom-out-button, zoom-label, zoom-in-button, pan-zoom-container, node (also carrying data-node-id), edge.

Migrating to Ant Design

Not codemod-covered — AntD ships no diagramming components of its own; a node-link graph typically migrates to a dedicated library (React Flow, Cytoscape.js) rather than an antd component.