svelte-d3

Port D3-driven chart components to Svelte 5 with D3 for math and Svelte for DOM.

1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/gnoblet/ANA_app_svelte --skill svelte-d3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svelte-d3
Source: https://github.com/gnoblet/ANA_app_svelte/tree/main/.claude/skills/svelte-d3
Command: npx skills add https://github.com/gnoblet/ANA_app_svelte --skill svelte-d3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables developers to build, port, and review D3-based visualizations in Svelte 5 without leakage of DOM manipulation into Svelte templates, ensuring clean separation of concerns.

Core Features & Use Cases

  • Enforces D3 usage for math, geometry, and data transforms while letting Svelte render DOM elements.
  • Provides porting guidance and patterns for common visualizations (arcs, beeswarm, stacked bars, axes, tooltips) adapted to Svelte 5 runes.
  • Supports referencing upstream patterns from svelte-d3 and applying project-specific tokens and best practices.

Quick Start

Port a D3-driven chart component from upstream to Svelte 5 by following the porting checklist.

Frequently Asked Questions about svelte-d3

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port D3 visualizations to Svelte 5 without DOM manipulation conflicts?

To port D3 visualizations to Svelte 5, restrict D3 strictly to math, geometry, and data transforms while letting Svelte handle all DOM rendering. This separation prevents manipulation conflicts and ensures clean component architecture using Svelte 5 runes.

Can I use D3 axes and tooltips with Svelte 5 runes?

Yes, D3 axes and tooltips work with Svelte 5 runes by applying porting patterns that compute scales and geometry in D3, then pass the resulting data to Svelte components for DOM rendering and reactive updates.

What is the best way to build a beeswarm chart in Svelte using D3?

The best way to build a beeswarm chart in Svelte is using D3 for the underlying math and data transforms to position nodes, then mapping those computed coordinates directly to Svelte-rendered DOM elements for a clean visualization.

Does Svelte 5 work well for complex D3 chart components like stacked bars and arcs?

Svelte 5 works well for complex D3 chart components like stacked bars and arcs by enforcing a strict division where D3 calculates layouts and Svelte renders the output, aligning with reusable primitives and runes.

How do I apply project-specific color tokens to D3 charts in Svelte?

Apply project-specific color tokens to D3 charts in Svelte by enforcing token-based color and style conventions across all ported visualization components, ensuring consistent styling while D3 handles data transforms and Svelte manages rendering.

Why should I separate D3 logic from Svelte DOM rendering?

Separating D3 logic from Svelte DOM rendering prevents leakage of manual DOM manipulation into Svelte templates, ensuring clean separation of concerns, maintainable code, and proper alignment with Svelte 5 runes and reusable primitives.