SYS:ONLINE● ACTIVE
THEME
GITHUBv0.1.0

NODE GRAPH

SVG node-edge graph for visualizing networks, pipelines, and system topologies. Supports directed arrowheads, animated marching-ants edges, per-node status colors, and hover highlights.

PREVIEW

SHIP SUBSYSTEM NETWORK
COREprimaryNAVonlineCOMMSdegradedLIFEnominalSENSORSfault

INSTALLATION

BASH
npx shadcn@latest add @scificn/node-graph

USAGE

TSX
import { NodeGraph, type NodeGraphNode, type NodeGraphEdge } from '@/ui/node-graph'

// Node coordinates are 0–100 in both x and y
const nodes: NodeGraphNode[] = [
  { id: 'a', label: 'ALPHA',  x: 20, y: 50, status: 'ACTIVE' },
  { id: 'b', label: 'BETA',   x: 80, y: 50, status: 'WARNING', sublabel: 'check req' },
]

const edges: NodeGraphEdge[] = [
  { from: 'a', to: 'b', animated: true, label: 'DATA' },
]

<NodeGraph
  nodes={nodes}
  edges={edges}
  directed
  title="DATA PIPELINE"
  height={280}
/>

DIRECTED + ANIMATED

DATA PIPELINE // DIRECTED + ANIMATED EDGES
FILTERSTOREINGESTPARSEFILTERSTOREEMITARCHIVE

VARIANTS

variant="ACTIVE"

ALPHABETA

variant="WARNING"

ALPHABETA

variant="CRITICAL"

ALPHABETA

variant="DEFAULT"

ALPHABETA

NODE STATUS COLORS

NODE STATUS STATES
ACTIVEWARNINGCRITICALOFFLINE

PROPS

PROPTYPEDEFAULTDESCRIPTION
nodesNodeGraphNode[]Array of nodes. x/y are 0–100 coordinate space.
edgesNodeGraphEdge[]Array of from/to edge connections.
variantDEFAULT | ACTIVE | WARNING | CRITICALACTIVEControls default edge and fallback node color.
titlestringundefinedOptional header label.
heightnumber320SVG height in px.
directedbooleanfalseShow arrowheads on edges.
classNamestringAdditional classes merged via cn().