Lottie
Export any Popcons icon as Lottie JSON and play it with a Lottie player.
Every icon can be exported as a Lottie JSON file generated from the same motion data as the React and CSS versions, so the timing matches.
- Open an icon and tune its style.
- Choose Lottie and download the
.jsonfile. - Play it with any Lottie player, or import it into a tool that supports Lottie.
import lottie from "lottie-web";
import bell from "./bell.json";
lottie.loadAnimation({
container: document.getElementById("bell")!,
renderer: "svg",
loop: true,
autoplay: true,
animationData: bell,
});Lottie players don't read prefers-reduced-motion by themselves. Check window.matchMedia("(prefers-reduced-motion: reduce)") and pause or show a still frame when it matches. The Popcons landing page does exactly that.