Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
Published on: 2025-05-07 22:00:29
snapDOM
snapDOM is a high-fidelity DOM capture tool, developed as part of the animation engine I'm developing for Zumly — a framework for creating smooth zoom-based view transitions.
It converts any HTML element into a scalable SVG image, preserving styles, fonts, backgrounds, shadow DOM content, pseudo-elements, and more.
📸 Full DOM capture
🎨 Embedded styles, pseudo-elements, and fonts
🖼️ Export to SVG, PNG, JPG, WebP, or canvas
⚡ Lightweight, no dependencies
📦 100% based on standard Web APIs
Installation
You can use snapDOM by including it via NPM, CDN, script tag, or by importing it as a module.
NPM / Yarn
npm i @zumer/snapdom
yarn add @zumer/snapdom
CDN
< script src =" https://unpkg.com/@zumer/snapdom@latest/dist/snapdom.min.js " > script >
Script tag (local)
< script src =" snapdom.js " > script >
The global object snapdom will be available.
ES Module
import { snapdom } from './snapdom.mjs' ;
Script Tag (Type Module)
< script type = "module" > import { s
... Read full article.