I built a declarative layout engine for SVG, Canvas, WebGL
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
Hey HN,I built a tiny zero DOM layout engine for vector graphics and custom renderers to resolves nested rows/cols/grids into exact `{x, y, w, h}` boxes, with text measurement, overflow signals, and collision separation.This is to help make SVG, PDF, Canvas responsive.Feedback welcome from anyone building canvas/SVG diagrams, dashboards, node editors, or diagram tools.
HN · launched Jul 3, 2026 · 5 upvotes (top 89%) · 0 views
Niche: graphics rendering engines and libraries · 149 launches, 10 in the last 7 days ▼ -23% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 149 launches in graphics rendering engines and libraries →
Could you build this?
No Writing a custom layout engine from scratch requires deep understanding of layout algorithms, text shaping/measurement, collision resolution, and box-model mathematics without standard DOM abstractions. Prompting an AI cannot reliably produce a mathematically sound, performant, and bug-free layout solver without specialized engineering.
What it would actually take: A production-grade layout engine typically uses Rust, C++, or low-overhead TypeScript (similar to Yoga or Taffy). It requires implementing constraint solving algorithms (Cassowary or flexbox/grid layout passes), integrating HarfBuzz or Canvas text-metric probes for precise glyph sizing, and designing cache-aware bounding-box collision detection routines.
Discussion
No comments on this launch.
Competitors
Other products that read as similar to this one : 575 launches clear the similarity bar, closest 8 shown.
Attention rank: #521 of 576 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 241 days after the earliest competitor.
- I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs · hn · 2026-03-01 · 78 upvotes · similarity 0.51
- Minimalist library to generate SVG views of scientific data · hn · 2026-03-23 · 47 upvotes · similarity 0.51
- A CSS 3D Engine (no WebGL) · hn · 2026-06-01 · 80 upvotes · similarity 0.51
- lantern · github · 2026-10-23 · 229 upvotes · similarity 0.50
- Ripl · hn · 2026-03-19 · 17 upvotes · similarity 0.49
- ztd-charts · github · 2026-11-05 · 122 upvotes · similarity 0.49
- zero-js · github · 2026-09-24 · 57 upvotes · similarity 0.48
- I built a small browser engine from scratch in C++ · hn · 2026-01-28 · 146 upvotes · similarity 0.48
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.