Get started with atrament.js CDN

SEE LICENSE IN LICENSE.md licensed

Atrament.js is a minimalist, pixel-perfect vector drawing library for the web.

Tags:
  • canvas
  • drawing
  • handwriting
  • graphics

Stable version

Copied!

How to start using atrament.js CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with atrament.js CDN - cdnhub.io</title>
  <style>
    #example {
      font-size: 24px;
      color: initial;
    }
  </style>
  <script src="https://cdn.cdnhub.io/atrament.js/3.0.0/atrament.min.js"></script>
</head>
<body>
  <button id="change-color">Change text color</button>
  <p id="example">This text will be colored.</p>

  <script>
    const changeColorButton = document.getElementById('change-color');
    const exampleText = document.getElementById('example');

    changeColorButton.addEventListener('click', () => {
      exampleText.atrament('color', 'red');
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions