Created
January 10, 2026 09:46
-
-
Save Kareszrk/dc435285561d22540c182264b338a7c2 to your computer and use it in GitHub Desktop.
Canvas based lottie animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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