Use it in code
Download the file, then copy the code for your platform. It loops, and it holds a still frame for people who ask for less motion.
- Put
fluent-emoji-backhand-index-pointing-left-flat.lottiein your site'sanimationsfolder, so it loads from/animations/fluent-emoji-backhand-index-pointing-left-flat.lottie. - Paste this where it should play.
<script type="module" src="https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-wc@0.10.0/dist/dotlottie-wc.js"></script>
<dotlottie-wc src="/animations/fluent-emoji-backhand-index-pointing-left-flat.lottie" autoplay loop data-still="0.43"
aria-hidden="true"
style="display: block; width: 200px; height: 200px"></dotlottie-wc>
<script>
// People who ask for less motion see a still frame: data-still is how far in, from 0 to 1.
if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
const players = document.querySelectorAll('dotlottie-wc');
players.forEach((el) => el.removeAttribute('autoplay'));
customElements.whenDefined('dotlottie-wc').then(() => players.forEach((el) => {
const player = el.dotLottie;
if (!player || !el.dataset.still) return;
const show = () => player.setFrame(Math.round(Number(el.dataset.still) * (player.totalFrames - 1)));
if (player.isLoaded) show();
else player.addEventListener('load', show);
}));
}
</script>