@supermemory/memory-graph on npm
Check out the NPM page for more details
Installation
Quick start
Optional rendering and document navigation
Existing icon-based document nodes and connection styling remain the defaults. Opt in to stacked squares and stronger semantic connections withappearance:
documentNodes accepts 'icons' or 'stacked'; connections accepts 'default' or 'emphasized'. Both fields are optional and also work on GraphCanvas. Stacks stay inside existing node bounds and simplify at low zoom. Use colors.edgeDocument to configure document-source ink; older custom GraphCanvas palettes without that field use textSecondary in emphasized mode.
openDocumentOnEnter is off by default. With an onOpenDocument callback, MemoryGraph exposes a focused Enter action for the selected persisted document or one confirmed memory source. Typing, modifier shortcuts, repeats, composition and keys outside the graph do not open documents. Your callback retains responsibility for routing and access control; consumers without a callback receive no new opening behavior.
Backend API route
Create an API route to fetch documents from Supermemory:Variants
Console Variant - Full-featured dashboard view (0.8x zoom, space selector visible):Examples
With pagination
Highlighting search results
Controlled space selection
Custom empty state
Props reference
Core props
Pagination props
Display props
Controlled state props
Data types
DocumentWithMemories
MemoryEntry
Exports
Components
Hooks
Constants
Performance
The graph handles hundreds of nodes efficiently through:- Canvas-based rendering (not DOM elements)
- Viewport culling (only draws visible nodes)
- Level-of-detail optimization (simplifies when zoomed out)
- Change-based rendering (only redraws when state changes)