Quickstart & Three-Layer Architecture
Install SimplexViz in under two minutes, understand its strict three-layer / five-package separation, and inspect every default setting.
- Getting Started
- 8 min read
- Updated 2026-11-21
Key Takeaways
- Zero-config defaults solve 60-degree equilateral simplex layouts with guaranteed 0.0 px convex overlap.
- Works identically for tagged records, single- or multi-modal vector embeddings, and pairwise similarity kernels.
- Strictly decoupled across @simplex-viz/core (+ /worker & /dom), @simplex-viz/svg, @simplex-viz/canvas (2,000–10,000+ items at 60 FPS), @simplex-viz/react, and @simplex-viz/wc.
SimplexViz maps high-dimensional collections onto an adaptive 60° equilateral triangle mesh, blends node colors in perceptual OKLab space, separates every convex hull to 0.0 px overlap, and supports conformal 1:4 hierarchical drill-down plus path-independent chronological timeline playback.
Choose Your Package Layer
Each higher-level package re-exports core/SVG runtime primitives from lower layers—install only the single package matching your runtime, and import specialized subpaths (@simplex-viz/core/worker, @simplex-viz/core/dom, @simplex-viz/svg/ssr, @simplex-viz/wc/define) directly:
| Package | Runtime & Dependencies | Primary Entry Points |
|---|---|---|
@simplex-viz/react |
React 18 / 19 | <SimplexTopicGraph />, useSimplexGraphController(), useSimplexTimeline() |
@simplex-viz/wc |
Plain HTML, Astro, Vue, Svelte, Angular (zero React) | <simplex-topic-graph>, defineSimplexTopicGraphElement(), @simplex-viz/wc/define |
@simplex-viz/svg |
Vanilla TS, Vue, Svelte, Angular, Node.js SSR (@simplex-viz/svg/ssr exclusive) |
createSimplexSvg(), SimplexSvgController, SvgRendererAdapter, @simplex-viz/svg/ssr (renderSimplexSvgString()) |
@simplex-viz/canvas |
High-capacity HTML5 Canvas 2D (2,000–10,000+ items, zero per-node DOM, independent of @simplex-viz/svg) |
createSimplexCanvas(), SimplexCanvasController, CanvasRendererAdapter, renderSimplexSnapshotToCanvas() |
@simplex-viz/core |
Browser, Node.js, Bun, Deno, Web Workers (0 deps, DOM-free root & exclusive @simplex-viz/core/worker / @simplex-viz/core/dom) |
solveSimplexSnapshot(), SimplexGraphEngine, createSimplexTimeline(), @simplex-viz/core/worker, @simplex-viz/core/dom |
React Quickstart
npm install @simplex-viz/react
import { SimplexTopicGraph, createBarycentricZoomStrategy } from '@simplex-viz/react';
const items = [
{ id: '1', label: 'Simplex Mesh', tags: ['geometry', 'triangulation', 'math'] },
{ id: '2', label: 'OKLab Mixing', tags: ['color', 'geometry', 'perception'] },
{ id: '3', label: 'SAT Solver', tags: ['collision', 'geometry'] },
];
const zoom = createBarycentricZoomStrategy();
export function KnowledgeAtlas() {
return (
<div style={{ width: '100%', height: 560 }}>
<SimplexTopicGraph
items={items}
preset="glyphs"
zoomStrategy={zoom}
tooltip
/>
</div>
);
}
Vanilla TypeScript / Framework-Agnostic SVG
npm install @simplex-viz/svg
import { createSimplexSvg } from '@simplex-viz/svg';
const controller = createSimplexSvg('#atlas', items);
Web Component Quickstart (@simplex-viz/wc)
npm install @simplex-viz/wc
<simplex-topic-graph preset="badges" theme="dark" tooltip style="width: 100%; height: 520px;">
<script type="application/json">
[
{ "id": "1", "label": "Simplex Mesh", "tags": ["geometry", "triangulation", "math"] },
{ "id": "2", "label": "OKLab Mixing", "tags": ["color", "geometry", "perception"] },
{ "id": "3", "label": "SAT Solver", "tags": ["collision", "geometry"] }
]
</script>
</simplex-topic-graph>
<script type="module">
import '@simplex-viz/wc/define';
</script>
High-Capacity Canvas 2D Quickstart (@simplex-viz/canvas)
When rendering 2,000–10,000+ items where thousands of SVG DOM elements become a bottleneck, switch to @simplex-viz/canvas for single-<canvas> HiDPI rendering, world-space frustum culling, automatic lodThresholdPx simplification, and native exportPng():
npm install @simplex-viz/canvas
import {
createSimplexCanvas,
createSubspaceZoomStrategy,
createCollisionDrivenLayoutStrategy,
} from '@simplex-viz/canvas';
const controller = createSimplexCanvas('#atlas', {
items: largeCorpus,
preset: 'badges',
theme: 'dark',
layoutStrategy: createCollisionDrivenLayoutStrategy(),
zoomStrategy: createSubspaceZoomStrategy(),
lodThresholdPx: 3.5,
tooltip: true,
});
// Native zero-serialization PNG export:
const pngBlob = await controller.exportPng({ scale: 2 });
Off-Main-Thread Web Worker Quickstart (@simplex-viz/core/worker)
Keep UI frames locked at 60 FPS during heavy QAP annealing and PBD/SAT layout solves by moving computation into a Web Worker (or Node.js worker_threads) via @simplex-viz/core/worker, then painting the solved snapshot onto Canvas 2D or SVG:
// worker.ts
import { attachSimplexWorkerHandler } from '@simplex-viz/core/worker';
attachSimplexWorkerHandler();
// main.ts
import { createSimplexWorkerClient } from '@simplex-viz/core/worker';
import { renderSimplexSnapshotToCanvas } from '@simplex-viz/canvas';
const worker = createSimplexWorkerClient(
() => new Worker(new URL('./worker.ts', import.meta.url), { type: 'module' }),
);
const { snapshot } = await worker.solve(largeCorpus, {
width: 1200,
height: 760,
layoutStrategy: { kind: 'collision-driven' },
});
renderSimplexSnapshotToCanvas(canvasEl, snapshot, { theme: 'dark' });
Untagged Vector Embeddings Quickstart
When passing an embedding or pairwise similarity clusteringStrategy, getTags becomes optional at both the TypeScript type level and runtime:
import {
SimplexTopicGraph,
createSoftSimplexEmbeddingClusteringStrategy,
} from '@simplex-viz/react';
interface AudioSample {
readonly id: string;
readonly label: string;
readonly timbreVec: readonly number[];
readonly prosodyVec: readonly number[];
}
const audioClustering = createSoftSimplexEmbeddingClusteringStrategy<AudioSample>({
getEmbedding: [
{ name: 'Timbre', getVector: (s) => s.timbreVec, weight: 0.7 },
{ name: 'Prosody', getVector: (s) => s.prosodyVec, weight: 0.3 },
],
metric: 'cosine',
triangleSpread: 0.45,
});
<SimplexTopicGraph items={samples} clusteringStrategy={audioClustering} tooltip />;
Complete Default Settings Table
Every pipeline stage ships with a named deterministic default strategy out of the box:
| Stage / Option | Canonical Strategy | Factory & Out-of-the-Box Behavior |
|---|---|---|
meshStrategy |
Adaptive Hex Lattice | createAdaptiveHexMeshStrategy() — Aspect-aligned full-canvas 60° equilateral lattice (minSideLength: 130 px, maxClusters: 14, adaptive innerPadding: 32–48 px). |
clusteringStrategy |
Jaccard Annealing Clustering | createJaccardAnnealingClusteringStrategy() — Jaccard partitioning + QAP Simulated Annealing + 'planar-hitting-set' + 'explaining-away'. |
colorStrategy |
OKLab Edge Contrast | createOklabContrastColorStrategy() — Greedy + swap OKLab edge contrast (ΔE_OK) + barycentric OKLab mixing. |
layoutStrategy |
Uniform PBD Layout | createPbdUniformLayoutStrategy() — Mesh-inward fan seeder + space-filling PBD dispersion + global uniform scale search (0.0 px overlap). |
zoomStrategy |
Continuous Free Camera | createFreeCameraZoomStrategy() — Continuous cursor wheel zoom, drag-to-pan, and 2-finger touch pinch. |
timeline |
Disabled (false) |
Opt-in true | TimelinePlayerOptions — Built-in Play/Pause/Step/Scrubber HUD with autoFinalSeed, autoFinalSeedLayout (false | 'pinned' | 'adaptive'), and emptyClusterBehavior. |
emptyClusterBehavior |
Normal ('normal') |
'normal' | 'dim' | 'hide' — Controls how 0-item clusters render (e.g., future clusters during chronological playback). |
itemFilter / itemFilterMode |
null / 'dim' |
Zero-relayout item filtering ((item) => boolean, 'dim' | 'hide') dimming or hiding non-matching items while preserving exact SAT coordinates. |
deferInitialLayout |
Auto-Recover (false) |
Automatically recovers from 0×0 mounts on the first non-zero ResizeObserver entry (zero spring jump); set true or { fallbackTimeoutMs } to skip provisional 960×620 solving until visible. |
touchScrollLockPx / clickTolerancePx |
8 px / 12 px |
Mobile touch direction-locking (touch-action: pan-y; set 0 for touch-action: none) and peak-displacement drag-vs-click click suppression across free-camera and drill-down modes. |
ariaLabel / keyboardNavigation |
Accessible (true) |
WCAG 2.1 AA single-tabstop keyboard navigation (Arrow keys, Home/End, Enter/Space, Shift+Enter/Shift+Space, Escape), high-contrast double-halo SVG focus ring, semantic ARIA labels, and polite aria-live announcements. |
reducedMotion |
Auto ('auto') |
'auto' | boolean — Subscribes live to OS (prefers-reduced-motion: reduce) and snaps springs, camera flights, zoom transitions, and morphs immediately when active. |
selectedIds / marqueeSelection |
[] / true |
Independent multi-selection state supporting Shift+Click, Shift+Drag marquee overlay, keyboard selection, and high-contrast violet selection rings. |
preset / theme |
Geometric Preset (Dark) | 'geometric' / 'dark' — Morphing geometric SVG content shapes (customizable via getShape & shapeOptions) + cluster anchors/badges on dark canvas. |