Skip to content

GraphLayout

stable

Force-directed or grid layout engine for node graphs

import { GraphLayout } from "@nodus/design-system"
Loading demo…

Props

nodesrequired
Type Node[]Default

Array of graph nodes

edgesrequired
Type Edge[]Default

Array of connections between nodes

layout
Type "force" | "dagre" | "manual"Default "force"

Layout algorithm

onNodeClick
Type (id: string) => voidDefault

Node click handler

Metadatasurfacenode
MobileStacks / Scroll

Graph canvas does not reflow automatically. On mobile, wrap in a fixed-height scrollable container (overflow: auto; -webkit-overflow-scrolling: touch). Consider a simplified list view as a mobile fallback.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?