Get started with svgeezy CDN

MIT licensed

SvgEasily: library for effortless SVG creation & manipulation in browsers.

Tags:
  • svg
  • fallback
  • png
  • javascript

Stable version

Copied!

How to start using svgeezy CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with svgeezy CDN - cdnhub.io</title>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/svgeezy.min.js"></script>
</head>
<body>
  <svg id="my-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
    <text x="50" y="50">Hello, SVGeezy!</text>
  </svg>

  <script>
    import svgeezy from 'svgeezy';

    svgeezy('#my-svg').then(({ defaultIcon }) => {
      const icon = defaultIcon.cloneNode(true);
      icon.setAttribute('x', '20');
      icon.setAttribute('y', '20');
      icon.setAttribute('width', '30');
      icon.setAttribute('height', '30');
      icon.setAttribute('fill', '#f00');
      mySvg.appendChild(icon);
    });
  </script>
</body>
</html>
Copied!
Copied!

All versions