Start with HTML.
Get the result you need.
SnapDOM captures a rendered interface in your browser. Use the core for images, add a plugin for other outputs, or connect a tool to test and automate the work.
An element, component, report or dashboard with its CSS and resources.
Styles, fonts, images, layout and control values.
- Image / canvasCore
- PDF documentPlugin
- HTML snapshotPlugin
- GIF / videoPlugins
- Text / element mapPlugins
Four ways in
What comes with the core?
SnapDOM runs inside the page. It captures styles, web fonts, pseudo-elements, SVG, canvas, open Shadow DOM, accessible iframe content and form state. You choose output resolution and reuse the captured result.
const shot = await snapdom(element);
const file = await shot.toBlob({ format: 'png' });Images & canvas
Save a chart, dashboard or component as an image. Use canvas output as a WebGL texture.
How it looks in code
const png = await snapdom.toPng(el);
const canvas = await snapdom.toCanvas(el);PDF documents
Turn an HTML report or invoice into a searchable document. Add page breaks, bookmarks and optional fillable fields.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { pdf } from '@zumer/snapdom-plugins/pdf';
const result = await snapdom(el, { plugins: [pdf()] });
const file = await result.toPdf({ page: 'a4' });HTML snapshots
Save the rendered markup with its styles and resources. Reopen the snapshot without rebuilding your application.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { htmlExport } from '@zumer/snapdom-plugins/html-export';
const result = await snapdom(el, { plugins: [htmlExport()] });
const html = await result.toHtml();GIF & video
Record the live element over time for short animations, demos and review clips.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { gifExport } from '@zumer/snapdom-plugins/gif-export';
const result = await snapdom(el, { plugins: [gifExport()] });
const gif = await result.toGif({ fps: 8, duration: 1000 });Context for agents
Give an agent the captured text, form state and locations of interactive elements.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { agentMap } from '@zumer/snapdom-plugins/agent-map';
const result = await snapdom(el, { plugins: [agentMap()] });
const map = await result.toAgentMap({ image: 'annotated' });ASCII art
Represent the captured appearance with a grid of characters.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { asciiExport } from '@zumer/snapdom-plugins/ascii-export';
const result = await snapdom(el, { plugins: [asciiExport()] });
const text = await result.toAscii({ width: 80 });Vector artwork
Turn captured text and supported shapes into editable SVG artwork or Figma content. Vector is prepared locally in @zumer/snapdom-plugins/vector and has not been published yet.
Keep private content out
Mask fields, exclude blocks or remove attributes before they reach an image, document or semantic export.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { redactInputs } from '@zumer/snapdom-plugins/redact-inputs';
const result = await snapdom(el, { plugins: [redactInputs()] });
const png = await result.toPng();Change text or appearance
Replace text, apply a filter, blend a colour or add a timestamp to the captured copy. The original interface stays in place.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { timestampOverlay } from '@zumer/snapdom-plugins/timestamp-overlay';
const result = await snapdom(el, { plugins: [timestampOverlay()] });
const png = await result.toPng();Choose the capture area
Capture a single element or a clipped region. Core options also let you exclude selected nodes.
How it looks in code
await snapdom.toPng(el, { exclude: ['.demo-input'] });
await snapdom.toPng(document.body, { clip: 'viewport' });SnapDIFF
Compare captures against baselines, inspect changed pixels and use the result in a browser test suite or CI.
SnapEye
Capture, compare and record a local app through a CLI or page API. Give a coding agent artifacts and change regions.
Describe a captured interface
Export readable text, state and geometry. An element map can add numbered annotations to an image of the same capture.
How it looks in code
import { snapdom } from '@zumer/snapdom';
import { contextExport } from '@zumer/snapdom-plugins/context-export';
const result = await snapdom(el, { plugins: [contextExport()] });
const outline = await result.toContext();Operate a browser
Navigate, locate controls, act and verify what changed. SnapSurf adds browser interaction around capture evidence.