WHAT IS IT?
snapDOM is a JavaScript DOM capture engine that turns any page element into an image. It positions itself as a modern, fast, dependency-free alternative to html2canvas and dom-to-image. Everything is built on standard Web APIs: no third-party runtime, no dependencies to install.
WHY IS IT INTERESTING?
- Faithful capture: Grabs the element with its embedded styles, pseudo-elements and fonts. The output matches what the user actually sees.
- Multi-format: Export to SVG, PNG, JPG, WebP, Canvas or Blob from a single capture. One clone, multiple reusable outputs.
- Zero dependencies, ultra-fast: Built purely on Web APIs, it targets sub-second captures and outpaces competing libraries in benchmarks.
- Edge cases handled: Same-origin iframes, CSS counters, line-clamp… the details that break other tools are covered.
- Plugin system: An extensible architecture (in beta) to add your own exporters and transformations without touching the core.
USE CASES
- Generate a share image (Open Graph, social media) from a client-side rendered component
- Export a chart, table or receipt to PNG/PDF straight from the browser
- Create page previews or thumbnails without a headless rendering server
- Capture UI state for bug reports or visual documentation
