@org_pigeon/ui
v0.1.0
Published
Interactive graph visualization React components for Pigeon
Downloads
60
Maintainers
Readme
@org_pigeon/ui
Interactive graph visualization React components for Pigeon.
Install
npm install @org_pigeon/uiPeer dependencies: react ≥ 18, react-dom ≥ 18.
Usage
import { PigeonGraphView } from "@org_pigeon/ui";
// `graph` is a PigeonGraph from @org_pigeon/analyzer
// or a deserialized pigeon-graph.json (nodes as Map)
<PigeonGraphView
graph={graph}
width="100%"
height={600}
onNodeClick={(id, type, name) => {
console.log("Clicked:", type, name);
}}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| graph | PigeonGraph | required | The graph to render |
| width | number \| string | "100%" | Container width |
| height | number \| string | 600 | Container height |
| onNodeClick | (id, type, name) => void | — | Called when a node is clicked |
License
MIT
