sigilUI

Dependency Graph

A directed dependency graph with positioned nodes, arrow edges, and optional labels.

@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 },
  ]}
  edges={[
    { from: "app", to: "api", label: "REST" },
  ]}
  nodeRadius={28}
/>

Props

PropTypeDefaultDescription
nodesDepNode[]—Nodes with id, label, x, y, optional group
edgesDepEdge[]—Directed edges with optional label and dashed style
widthnumber500SVG width
heightnumber400SVG height
nodeRadiusnumber28Node circle radius

Token integration

CSS VariablePurpose
--s-borderNode stroke and edge lines
--s-surfaceNode fill
--s-textNode label text
--s-text-mutedEdge labels and group names
--s-font-monoAll text font family