Componentcharts0.9 KB gzipZero dependencies
Network Graph
Node-edge network graph with bezier links and hover highlight.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add network-graphOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { NetworkGraph } from "@/components/ui/network-graph"; <NetworkGraph />Source code
network-graph.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| nodes | NetworkNode[] | Configures nodes. (Default: []) |
| edges | NetworkEdge[] | Configures edges. (Default: []) |
| height | number | Configures height. (Default: 260) |