Skip to content

Instantly share code, notes, and snippets.

@Kareszrk
Created January 10, 2026 09:46
Show Gist options
  • Select an option

  • Save Kareszrk/dc435285561d22540c182264b338a7c2 to your computer and use it in GitHub Desktop.

Select an option

Save Kareszrk/dc435285561d22540c182264b338a7c2 to your computer and use it in GitHub Desktop.
Canvas based lottie animation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Lottie Animation</title>
<script
src="https://unpkg.com/@lottiefiles/dotlottie-wc@0.8.11/dist/dotlottie-wc.js"
type="module"
></script>
</head>
<body>
<canvas id="canvas" width="300" height="300"></canvas>
<script type="module">
import { DotLottie } from "https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web/+esm";
new DotLottie({
autoplay: true,
loop: true,
canvas: document.getElementById("canvas"),
src: "https://lottie.host/7dacc041-9a53-4dcb-a7ac-0d2c9794fed4/3ENheyTSiy.lottie",
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment