finds.dev

mhkeller/layercake

graphics framework for sveltejs

View on GitHubHomepage ↗

★ 1,795SvelteMITupdated Oct 2026

// the take

LayerCake is a headless charting framework for Svelte that gives you layout primitives (scales, dimensions, SVG/Canvas/HTML/WebGL wrapper layers) and a gallery of example chart components you copy into your own project. It's for Svelte developers who want D3-level control over chart logic without wiring up scales and responsive sizing by hand every time.

The headless approach is the actual design win here: it doesn't lock you into a visual style, it just handles the boring parts (scales, extents, container sizing) and lets you own the markup. Layering SVG, Canvas, HTML and WebGL inside the same chart is a real, useful pattern - render thousands of points to Canvas for speed while keeping axes and labels in SVG/HTML for accessibility and easy styling. The component gallery covers a wide range of real chart types (Sankey, radar, beeswarm with force layout, calendar heatmaps, choropleth maps), not just bar/line/scatter. It's actively maintained - the v11 rewrite to Svelte 5 runes, Playwright visual regression tests with snapshot update workflows, and CodeQL scanning all show someone is actually keeping this current.

It's Svelte-only - no path to this if your stack is React or Vue, and the whole value proposition disappears outside that ecosystem. The jump to runes in v11 is a breaking API change, so anything you find on Stack Overflow or in older tutorials referencing the store-based API won't transfer, and you're stuck cross-referencing a separate v10 docs archive while migrating. 'Headless' cuts both ways: you don't get finished chart components, you get starting points you copy into your repo and now own - that's more upfront work than a library like Observable Plot where you just pass data and get a chart, and it means your chart components silently drift from upstream unless you manually diff them against new releases. At ~1,800 stars it has a small community relative to D3 or Plot, so expect to debug scale/domain edge cases yourself rather than finding an existing answer.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,795
Forks
42
Language
Svelte
License
MIT
Last commit
20 Oct 2026

// nearby

If layercake isn't quite it.

All repos →