Build interactive visualizations for Next.js (SVG, Canvas, Three.js, Framer Motion). Use when creating diagrams, animations, simulations, or data visualizations.
When to Use: Building interactive visualizations for Next.js/React sites that need to both look stunning AND teach concepts effectively through interactivity.
When NOT to Use: Static charts (use a charting library), pure decoration with no pedagogical purpose, or backend data dashboards (use admin tooling).
Core Insight: The best visualizations are not fancy effects in search of a purpose. They make concepts viscerally obvious that would take paragraphs of text to explain poorly. Every animation, every interaction, every color choice must serve comprehension.
The Golden Thread
These are the invariant truths distilled from 100+ production visualizations across jeffrey_emanuel_personal_site, frankentui_website, frankensqlite_website, and asupersync_website. They are non-negotiable:
#
Principle
Why It Matters
1
Pedagogy drives design, not aesthetics
A beautiful viz that doesn't teach is just a screensaver
2
Progressive disclosure over information dump
Reveal complexity gradually via steppers, scroll triggers, phases
3
Device-aware quality tiers, not responsive compromise
Low/medium/high particle counts, different interaction models per device class
4
Dual interaction models
Desktop = hover + parallax + keyboard; Mobile = tap + haptic + bottom-sheet
5
Spring physics over linear interpolation
Springs feel natural; linear feels robotic
6
SVG for structure, Canvas/WebGL for particles
Pick technology by visualization type, not familiarity
7
Lazy initialization is mandatory
IntersectionObserver + rootMargin. Never render heavy content off-screen
8
prefers-reduced-motion is not optional
Full accessibility support in every component, always
9
Real algorithms, not fake data
Embed actual implementations (CMA-ES, Myers diff, Hoeffding's D) for correctness
10
Comparative juxtaposition
Side-by-side before/after makes differences viscerally obvious
Test on real mobile: Not just browser resize - actual touch interactions
Validate pedagogy: Does a first-time viewer actually learn the concept?
Tech Selection Guide
Need
Technology
When to Use
State transitions, layout animation
Framer Motion
Default choice for all animated React components
SVG diagrams, node graphs, trees
SVG + Framer Motion
Structured diagrams with <50 animated elements
Particle systems, 3D visualization
React Three Fiber (Three.js)
>100 particles, 3D space, WebGL shaders
Canvas 2D rendering
Raw Canvas + RAF
Custom rendering not suited to SVG DOM
Statistical calculations, scales
D3.js (math only)
Scales, color interpolation, statistics. NOT for rendering
Complex data tables with viz
TanStack Table + Virtual
Sortable/filterable data with virtualization
Timeline animations
GSAP
Complex sequenced timelines (alternative to Framer)
Charts with large datasets
ECharts
When D3+SVG would choke on data volume
Technology Anti-Patterns
Never use D3 for DOM manipulation in React (use D3 for math, React for rendering)
Never use Three.js for flat diagrams (SVG is simpler and more accessible)
Never use CSS keyframe animations for interactive state (can't respond to user input)
Never use react-spring AND Framer Motion together (pick one animation library)
Never use force-directed layout for fixed diagrams (compute positions deterministically)
Key Reusable Patterns
Stepper Controller — The single most reusable pattern (used in 30+ visualizations). Prev/Next/Play controls with keyboard support, auto-play, step dots, and haptic feedback. Full implementation in QUICK-REFERENCE.md.
Semantic Colors — Consistent across all visualizations: emerald=success, red=error, amber=warning, cyan=active, sky=info, violet=accent, slate=muted. Color is never the sole indicator — always pair with icons/labels/shapes. Full palette in GOLDEN-THREAD.md.
Spring Physics — Default transitions: { type: "spring", stiffness: 200, damping: 25 }. Snappy: stiffness: 400, damping: 35. Magnetic: stiffness: 150, damping: 15, mass: 0.1. Full configs in QUICK-REFERENCE.md.
Validation Checklist
Before considering any visualization complete:
Teaches something: A non-expert can explain the concept after interacting
Works without animation: Meaningful in static/reduced-motion mode
Spring-tuned: All motion uses spring physics (not linear/ease), feels natural
Semantic colors: Consistent with the color system above
No orphaned animations: All RAF/intervals cleaned up on unmount
TypeScript types: All props, state, and callbacks fully typed
References
Topic
Reference
Copy-paste patterns for every viz type
QUICK-REFERENCE.md
The 12 invariant principles with code examples
GOLDEN-THREAD.md
Detailed component patterns by visualization type
COMPONENT-PATTERNS.md
Device-specific interaction and quality strategies
MOBILE-DESKTOP.md
Pedagogical design principles for teaching with viz
PEDAGOGY.md
Performance optimization patterns
PERFORMANCE.md
Concept → visualization decomposition engine
CONCEPT-DECOMPOSITION.md
Scroll narrative architecture for full-page composition
SCROLL-NARRATIVE.md
Motion lexicon — narrative beats to animation recipes
MOTION-LEXICON.md
Visual design system — dark canvas, glass, shadows, typography
AESTHETIC-DNA.md
1---2name: interactive-visualization-creator3description: Build interactive visualizations for Next.js (SVG, Canvas, Three.js, Framer Motion). Use when creating diagrams, animations, simulations, or data visualizations.4---56<!-- TOC: Golden Thread | Quick Router | Visualization Types | Creation Workflow | Tech Selection | Device Strategy | Pedagogy Principles | Performance | Accessibility | Validation | References -->78# Interactive Visualization Creator910> **When to Use:** Building interactive visualizations for Next.js/React sites that need to both look stunning AND teach concepts effectively through interactivity.11>12> **When NOT to Use:** Static charts (use a charting library), pure decoration with no pedagogical purpose, or backend data dashboards (use admin tooling).13>14> **Core Insight:** The best visualizations are not fancy effects in search of a purpose. They make concepts viscerally obvious that would take paragraphs of text to explain poorly. Every animation, every interaction, every color choice must serve comprehension.1516---1718## The Golden Thread1920These are the invariant truths distilled from 100+ production visualizations across jeffrey_emanuel_personal_site, frankentui_website, frankensqlite_website, and asupersync_website. They are non-negotiable:2122| # | Principle | Why It Matters |23|---|-----------|----------------|24| 1 | **Pedagogy drives design, not aesthetics** | A beautiful viz that doesn't teach is just a screensaver |25| 2 | **Progressive disclosure over information dump** | Reveal complexity gradually via steppers, scroll triggers, phases |26| 3 | **Device-aware quality tiers, not responsive compromise** | Low/medium/high particle counts, different interaction models per device class |27| 4 | **Dual interaction models** | Desktop = hover + parallax + keyboard; Mobile = tap + haptic + bottom-sheet |28| 5 | **Spring physics over linear interpolation** | Springs feel natural; linear feels robotic |29| 6 | **SVG for structure, Canvas/WebGL for particles** | Pick technology by visualization type, not familiarity |30| 7 | **Lazy initialization is mandatory** | IntersectionObserver + rootMargin. Never render heavy content off-screen |31| 8 | **prefers-reduced-motion is not optional** | Full accessibility support in every component, always |32| 9 | **Real algorithms, not fake data** | Embed actual implementations (CMA-ES, Myers diff, Hoeffding's D) for correctness |33| 10 | **Comparative juxtaposition** | Side-by-side before/after makes differences viscerally obvious |34| 11 | **Color is semantic** | green=success, red=error, amber=warning, cyan=active, blue=info. Consistent always |35| 12 | **useRef for high-frequency, useState for UI** | RAF loops, mouse tracking, physics sims use refs to avoid re-renders |3637See [GOLDEN-THREAD.md](references/GOLDEN-THREAD.md) for the complete deep-dive with code examples from all four projects.3839---4041## Quick Router4243| I need to... | Go to |44|---|---|45| Build a state machine / algorithm walkthrough | [COMPONENT-PATTERNS.md > Stepper Visualizations](references/COMPONENT-PATTERNS.md#stepper-visualizations) |46| Build a network graph / relationship diagram | [COMPONENT-PATTERNS.md > Network Graphs](references/COMPONENT-PATTERNS.md#network-graphs) |47| Build a particle system / 3D scene | [COMPONENT-PATTERNS.md > Particle Systems](references/COMPONENT-PATTERNS.md#particle-systems) |48| Build a scroll-triggered animation | [COMPONENT-PATTERNS.md > Scroll Animations](references/COMPONENT-PATTERNS.md#scroll-triggered-animations) |49| Build a real-time simulation with sliders | [COMPONENT-PATTERNS.md > Live Simulations](references/COMPONENT-PATTERNS.md#live-simulations) |50| Build a comparative / side-by-side view | [COMPONENT-PATTERNS.md > Comparative Views](references/COMPONENT-PATTERNS.md#comparative-views) |51| Handle mobile vs desktop properly | [MOBILE-DESKTOP.md](references/MOBILE-DESKTOP.md) |52| Make it teach effectively | [PEDAGOGY.md](references/PEDAGOGY.md) |53| Optimize performance | [PERFORMANCE.md](references/PERFORMANCE.md) |54| Copy-paste starter patterns | [QUICK-REFERENCE.md](references/QUICK-REFERENCE.md) |55| Decompose ANY concept into a visualization design | [CONCEPT-DECOMPOSITION.md](references/CONCEPT-DECOMPOSITION.md) |56| Compose visualizations into a cinematic page narrative | [SCROLL-NARRATIVE.md](references/SCROLL-NARRATIVE.md) |57| Map narrative intent to exact motion recipes | [MOTION-LEXICON.md](references/MOTION-LEXICON.md) |58| Derive premium visual aesthetic from a single accent color | [AESTHETIC-DNA.md](references/AESTHETIC-DNA.md) |5960---6162## Visualization Type Selector6364| What you're visualizing | Type | Tech Stack |65|---|---|---|66| Process with discrete steps | **Stepper** | Framer Motion + SVG + AnimatePresence |67| Relationships between entities | **Network Graph** | SVG circular layout + Bezier curves |68| Data distribution / statistics | **Interactive Chart** | D3 math + SVG/Three.js + sliders |69| Tree / hierarchy | **Tree Viz** | SVG computed layout + path highlighting |70| Comparison of two approaches | **Side-by-Side** | Split grid + shared stepper + color contrast |71| Timeline / evolution | **Scroll-Triggered** | Framer Motion whileInView + staggered reveals |72| Particles / 3D space | **Particle System** | React Three Fiber + quality tiers |73| Ambient background | **Decorative** | GSAP/Framer + CSS + IntersectionObserver |7475See [COMPONENT-PATTERNS.md](references/COMPONENT-PATTERNS.md) for architecture and code for each type.7677---7879## Creation Workflow8081### Phase 1: Concept Design821. **Decompose the concept**: Use the [Concept Decomposition Engine](references/CONCEPT-DECOMPOSITION.md) to identify entities, states, transitions, and the teaching variable832. **Define the teaching goal**: What concept should the reader understand after interacting?843. **Identify the "aha moment"**: What specific interaction makes the concept click? (See [5 aha patterns](references/CONCEPT-DECOMPOSITION.md#step-4-engineer-the-aha-moment))854. **Choose visualization type**: Use the decision tree above865. **Sketch the states**: What are the discrete states/phases the user will see?8788### Phase 2: Architecture891. **Select technology stack**: See [Tech Selection](#tech-selection-guide) below902. **Establish visual aesthetic**: Derive dark canvas, glass surfaces, and color palette from accent color using [AESTHETIC-DNA.md](references/AESTHETIC-DNA.md)913. **Design interaction model**: Desktop hover vs mobile tap paths924. **Plan quality tiers**: What degrades on low-end devices?935. **Define color semantics**: Map colors to meaning before coding9495### Phase 3: Implementation961. **Build the static frame first**: SVG structure, node positions, layout972. **Add the stepper/controller**: Navigation controls for temporal visualizations983. **Wire up animations**: Framer Motion transitions between states994. **Add interactivity**: Hover/click/drag handlers1005. **Implement device adaptation**: Touch detection, quality scaling, bottom sheets1016. **Add accessibility**: reduced-motion, ARIA labels, keyboard nav102103### Phase 4: Page Composition1041. **Choose narrative arc**: Select a [page template](references/SCROLL-NARRATIVE.md#narrative-arc-templates) that matches your content1052. **Allocate scroll budget**: Assign vertical space per section using the [scroll budget calculator](references/SCROLL-NARRATIVE.md#scroll-budget-calculator)1063. **Choreograph entrances**: Apply [SectionShell pattern](references/SCROLL-NARRATIVE.md#entrance-choreography-system) with staggered reveals1074. **Run the billboard test**: Screenshot random scroll positions — each must be coherent108109### Phase 5: Polish1101. **Assign narrative beats**: Map each section's emotional intent to a [Motion Lexicon beat](references/MOTION-LEXICON.md) for exact spring/color/timing recipes1112. **Spring-tune all transitions**: Adjust stiffness/damping until motion feels natural1123. **Add micro-interactions**: Haptic feedback, particle bursts, glow effects1134. **Test on real mobile**: Not just browser resize - actual touch interactions1145. **Validate pedagogy**: Does a first-time viewer actually learn the concept?115116---117118## Tech Selection Guide119120| Need | Technology | When to Use |121|------|-----------|-------------|122| State transitions, layout animation | **Framer Motion** | Default choice for all animated React components |123| SVG diagrams, node graphs, trees | **SVG + Framer Motion** | Structured diagrams with <50 animated elements |124| Particle systems, 3D visualization | **React Three Fiber** (Three.js) | >100 particles, 3D space, WebGL shaders |125| Canvas 2D rendering | **Raw Canvas + RAF** | Custom rendering not suited to SVG DOM |126| Statistical calculations, scales | **D3.js** (math only) | Scales, color interpolation, statistics. NOT for rendering |127| Complex data tables with viz | **TanStack Table + Virtual** | Sortable/filterable data with virtualization |128| Timeline animations | **GSAP** | Complex sequenced timelines (alternative to Framer) |129| Charts with large datasets | **ECharts** | When D3+SVG would choke on data volume |130131### Technology Anti-Patterns132133- **Never use D3 for DOM manipulation** in React (use D3 for math, React for rendering)134- **Never use Three.js for flat diagrams** (SVG is simpler and more accessible)135- **Never use CSS keyframe animations for interactive state** (can't respond to user input)136- **Never use react-spring AND Framer Motion together** (pick one animation library)137- **Never use force-directed layout for fixed diagrams** (compute positions deterministically)138139---140141## Key Reusable Patterns142143**Stepper Controller** — The single most reusable pattern (used in 30+ visualizations). Prev/Next/Play controls with keyboard support, auto-play, step dots, and haptic feedback. Full implementation in [QUICK-REFERENCE.md](references/QUICK-REFERENCE.md#stepper-component).144145**Semantic Colors** — Consistent across all visualizations: `emerald`=success, `red`=error, `amber`=warning, `cyan`=active, `sky`=info, `violet`=accent, `slate`=muted. Color is never the sole indicator — always pair with icons/labels/shapes. Full palette in [GOLDEN-THREAD.md](references/GOLDEN-THREAD.md#11-color-is-semantic).146147**Spring Physics** — Default transitions: `{ type: "spring", stiffness: 200, damping: 25 }`. Snappy: `stiffness: 400, damping: 35`. Magnetic: `stiffness: 150, damping: 15, mass: 0.1`. Full configs in [QUICK-REFERENCE.md](references/QUICK-REFERENCE.md#spring-physics-constants).148149---150151## Validation Checklist152153Before considering any visualization complete:154155- [ ] **Teaches something**: A non-expert can explain the concept after interacting156- [ ] **Works without animation**: Meaningful in static/reduced-motion mode157- [ ] **Desktop interaction**: Hover states, keyboard navigation, cursor feedback158- [ ] **Mobile interaction**: Touch targets >= 44px, haptic feedback, no hover-dependent UI159- [ ] **Performance**: Lazy init via IntersectionObserver, RAF for physics, no layout thrashing160- [ ] **Accessibility**: prefers-reduced-motion, ARIA labels, focus indicators, color-not-alone161- [ ] **Spring-tuned**: All motion uses spring physics (not linear/ease), feels natural162- [ ] **Semantic colors**: Consistent with the color system above163- [ ] **No orphaned animations**: All RAF/intervals cleaned up on unmount164- [ ] **TypeScript types**: All props, state, and callbacks fully typed165166---167168## References169170| Topic | Reference |171|-------|-----------|172| Copy-paste patterns for every viz type | [QUICK-REFERENCE.md](references/QUICK-REFERENCE.md) |173| The 12 invariant principles with code examples | [GOLDEN-THREAD.md](references/GOLDEN-THREAD.md) |174| Detailed component patterns by visualization type | [COMPONENT-PATTERNS.md](references/COMPONENT-PATTERNS.md) |175| Device-specific interaction and quality strategies | [MOBILE-DESKTOP.md](references/MOBILE-DESKTOP.md) |176| Pedagogical design principles for teaching with viz | [PEDAGOGY.md](references/PEDAGOGY.md) |177| Performance optimization patterns | [PERFORMANCE.md](references/PERFORMANCE.md) |178| Concept → visualization decomposition engine | [CONCEPT-DECOMPOSITION.md](references/CONCEPT-DECOMPOSITION.md) |179| Scroll narrative architecture for full-page composition | [SCROLL-NARRATIVE.md](references/SCROLL-NARRATIVE.md) |180| Motion lexicon — narrative beats to animation recipes | [MOTION-LEXICON.md](references/MOTION-LEXICON.md) |181| Visual design system — dark canvas, glass, shadows, typography | [AESTHETIC-DNA.md](references/AESTHETIC-DNA.md) |
Run npx skillmds@latest add lev-os/interactive-visualization-creator in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Build interactive visualizations for Next.js (SVG, Canvas, Three.js, Framer Motion). Use when creating diagrams, animations, simulations, or data visualizations. It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
lev-os (@lev-os) published this skill. Their other Agent Skills are listed on their SkillMD profile.