html2canvas
html2canvas - Screenshots with JavaScript
Screenshots with JavaScriptHTML
      <div id="capture" style="padding: 10px; background: #f5da55">
    <h4 style="color: #000; ">Hello world!</h4>
</div>

      JavaScript
      html2canvas(document.querySelector("#capture")).then(canvas => {
    document.body.appendChild(canvas)
});

      Try it outDocumentationInstall NPMnpm install --save html2canvasInstall Yarnyarn add html2canvashtml2canvas.jshtml2canvas.min.js45kb gzippedConnectFollow @niklasvh