🚧 Work In Progress
Convert arbitrary DOM trees to SVG
- Recreate HTML styling in SVG faithfully
- Mirror input DOM tree in SVG structure
- Preserve text for scraping and editing
dom-to-svg
converts DOM trees to SVG images that recreate the exact
style of the input document.
The output is optimized to serve as exchange format for various vector-based image manipulation tools, such as Sketch or Figma.
import {domToSvg} from "dom-to-svg";
const svg = domToSvg(document.body);
document.appendChild(svg);
yarn
yarn start
dom-to-svg
is licensed under the MIT license. Copyright 2018 - present Mario Nebl.