What is Nodus?
Nodus is a graph visualization engine for the web. You give it a graph — nodes and edges — and it lays the graph out, styles it, draws it, and lets your users explore it interactively. It is designed to stay fast as graphs grow from a handful of nodes to hundreds of thousands.
Nodus ships as the npm package @kortexya/nodus.
What it does
- Models graphs. A simple JSON shape —
{ nodes, edges }— with arbitrary, type-safedataon every element. See The Graph Model. - Lays them out. Force, force-link, hierarchical, radial, concentric, grid and sequential layouts, each async and cancellable. See Layouts.
- Renders them. A GPU renderer (WebGPU/WebGL2) with an automatic Canvas 2D fallback, plus SVG export. See The Rendering Pipeline.
- Styles them. A CSS-like system of rules and classes drives colour, shape, size, strokes, halos, icons, labels and more. See Styling.
- Makes them interactive. Pan, zoom, rotate, hover, select, drag, lasso, rectangle-select, connect nodes, resize and rewire. See Interaction Tools.
- Analyzes them. Shortest paths, cycles, spanning trees, betweenness, connected components, circle packing and more. See Algorithms.
- Scales to hypergraphs. A full pipeline to simplify, lay out and render hypergraphs as polygon regions. See Hypergraphs.
What makes it different
Nodus’s compute and rendering core is written in Rust and compiled to
WebAssembly. Layout, geometry, spatial indexing and rendering all run as
compiled code, while a thin TypeScript facade preserves a clean, generic API
(Nodus<NodeData, EdgeData>) and owns the DOM. The compiled core is an
implementation detail — you still write ordinary JavaScript or TypeScript. See
Architecture.
When to use it
Reach for Nodus when you need to:
- visualize medium-to-large node–link diagrams in the browser without the frame rate collapsing;
- give users rich interaction — exploring, selecting and editing the graph;
- apply data-driven styling at scale through rules rather than per-element loops; or
- render set-like / hypergraph relationships, not just pairwise edges.
If you only need to draw a dozen static nodes once, almost anything will do. Nodus earns its keep when the graph is big, interactive, or both.
A minimal example
import { Nodus } from '@kortexya/nodus';
const nodus = new Nodus({ container: document.getElementById('graph') });
await nodus.setGraph({ nodes: [{ id: 'a' }, { id: 'b' }, { id: 'c' }], edges: [ { source: 'a', target: 'b' }, { source: 'b', target: 'c' }, ],});
await nodus.layouts.force({ duration: 0 });await nodus.view.locateGraph();Where to go next
- New to Nodus? Start with the Installation and Quick Start.
- Want the mental model first? Read The Graph Model and Architecture.
- Looking for a specific call? See the API Reference.