Componentcharts0.9 KB gzipZero dependencies

Network Graph

Node-edge network graph with bezier links and hover highlight.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add network-graph

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { NetworkGraph } from "@/components/ui/network-graph"; <NetworkGraph />

Source code

network-graph.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxnetwork-graph.tsx75 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface NetworkNode {  id: string;  label: string;  x: number;  y: number;  size?: number;} export interface NetworkEdge {  from: string;  to: string;  weight?: number;}

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { NetworkGraph } from "@/components/ui/network-graph"; <NetworkGraph />
PropTypeDescription
nodesNetworkNode[]Configures nodes. (Default: [])
edgesNetworkEdge[]Configures edges. (Default: [])
heightnumberConfigures height. (Default: 260)