Get started with bodymovin CDN

MIT licensed

Bodymovin.js exports/imports AE animations as JSON for web projects.

Tags:
  • animation
  • canvas
  • svg
  • after effects
  • plugin
  • export

Stable version

Copied!

How to start using bodymovin CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with bodymovin CDN - cdnhub.io</title>
  <style>
    #lottie-container {
      width: 400px;
      height: 400px;
      background: #f0f0f0;
    }
  </style>
</head>
<body>
  <div id="lottie-container"></div>
  <script src="https://cdn.cdnhub.io/bodymovin/5.12.2/lottie.min.js"></script>
  <script>
    async function loadAnimation() {
      const animationJSON = await fetch('path/to/your/animation.json').then('json');
      const lottieContainer = document.getElementById('lottie-container');
      const animation = lottie.loadAnimation({
        container: lottieContainer,
        renderer: 'svg',
        loop: true,
        autoplay: true,
        animationData: animationJSON
      });
    }

    loadAnimation();
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions