SnapDOMGitHub★ 8K
Live Vector export

Editable source

Generated output

Nothing generated yet.

Edit the source, then generate a Vector.

Code for this demo
Official plugin · MIT

Export editable vector artwork.

Reconstruct supported text and shapes as SVG artwork or copy the captured result into Figma.

Fidelity

See what changes in each format

Browsers, SVG and Figma do not support the same effects. The plugin tells you when it had to adapt, rasterize or omit something, and identifies the affected layer. You can review those changes before handing the file to a designer or a client.

Exact
The destination can reproduce the layer as editable vector content.
Adapted
The layer remains vector, but an effect was translated to the closest available equivalent.
Rasterized or omitted
The effect has no usable vector equivalent. The report names the layer and explains what happened.

The clearest case is backdrop-filter: frosted glass is a blur of whatever sits behind the panel, and SVG has no way to express that, so the panel arrives as a flat colour. The report names the layer, and the limits list it.

Read about fidelity reports

How it works

Built from the browser's resolved layout

Grid, flexbox, sticky positioning and container queries are already resolved on screen. The plugin measures that result instead of trying to implement another CSS layout engine.

Editable output
Text remains text. Gradients, borders, radii, shadows, transforms, images and DOM hierarchy become vector paint and usable layers.
Browser layout
Boxes, text lines and baselines are measured from the rendered page, including grid, flexbox, pseudo-elements and open shadow DOM.
Private by design
The plugin runs in the browser, including authenticated and staging pages. Captures are not uploaded to a server.
Tested output
729 checks over 19 fixtures. Fixtures are emitted, rendered and compared against screenshots of the live elements.
The whole API

Two methods on a SnapDOM capture

Register the plugin on a capture and it gains toVector() and toFigma(), alongside toPng() and toCanvas(). The only option is exclude.

import { snapdom } from '@zumer/snapdom'
import vector from '@zumer/snapdom-plugins/vector'

const shot = await snapdom(document.querySelector('#plan-card'), {
  plugins: [vector()]
})

const svg = await shot.toVector()   // standalone SVG, no foreignObject, text is text
await shot.toFigma()                // on the clipboard: paste it into Figma

Read the reference

Where it goes

An SVG file, or a paste into Figma

Both come from the same capture of the page, and neither needs a server or an install.

Flat SVG

shot.toVector()

Standalone SVG with editable text and native shapes. Open it in Illustrator, Inkscape, Penpot, Figma, a browser, a printer or a plotter.

Figma

shot.toFigma()

Copies the capture in Figma's own paste format. Paste it into a Figma file and you get frames, editable text, gradients, shadows and images, with nothing installed. The format is undocumented, so if a Figma release breaks it, the SVG route keeps working while we update.

Open source

Included in the SnapDOM monorepo

The Vector plugin is available as MIT-licensed source in packages/plugins/vector. PDF and Vector are available on npm in @zumer/snapdom-plugins 4.x and require SnapDOM 3.x.

Read the reference · SnapDOM on GitHub

Before you ask

Questions

Is this a tracer? Does it vectorise the pixels?

No. Nothing is traced and nothing is recognised. Every box, line and baseline is read from the live layout, and every fill is parsed from the CSS that produced it. A tracer cannot tell you the second stop of a gradient; this hands you its colour and position.

Will my page come into Figma perfect?

No, and any tool that says otherwise is one you will stop trusting on the third capture. Some things have no Figma equivalent at all: a colour-matrix filter, OpenType feature settings, per-range baseline shift. The difference here is that you get the list, per node, before you paste.

Do I need a Figma plugin?

No. toFigma() copies the capture and you paste it into Figma. The flat SVG opens in Illustrator, Inkscape, Penpot and any browser too, which is why this is not a Figma product with a lock-in problem.

Does anything leave the machine?

No. The engine runs in your page, and the copy for Figma goes through your own clipboard. For a lot of teams that is a legal requirement.

Which browsers?

Chromium today. Everything is measured there and the pixel baselines were recorded there. We have not run it against Firefox or WebKit, so we are not claiming them.

What if it does not work for my page?

Send us the page. A reproducible case helps improve fidelity, and the samples above are there so you can check the output on pages like yours first.