sigilUI

Dependency Graph

Map dependencies between connected nodes.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { DependencyGraph } from "@sigil-ui/components";

Usage

<DependencyGraph
    nodes={[
      { id: "app", label: "App", x: 250, y: 40 },
      { id: "api", label: "API", x: 120, y: 150 },
      { id: "db", label: "DB", x: 380, y: 150 },
      { id: "cache", label: "Cache", x: 250, y: 260, group: "infra" },
    ]}
    edges={[
      { from: "app", to: "api" },
      { from: "app", to: "db" },
      { from: "api", to: "cache", label: "reads", dashed: true },
      { from: "db", to: "cache", label: "syncs" },
    ]}
  />

Props

PropTypeDefaultDescription
nodes (required)DepNode[]—Nodes configuration.
edges (required)DepEdge[]—Edges configuration.
widthnumber—Width of the rendered content.
heightnumber—Height of the rendered content.
nodeRadiusnumber—Node Radius configuration.

Token integration

CSS VariablePurpose
--s-chart-axisChart axis
--s-text-mutedText muted
--s-font-monoFont mono
--s-surfaceSurface
--s-borderBorder
--s-textText