Two steps: add the lottie-player script to your page head, then drop an Embed block wherever you want the icon.
In Webflow: go to Page Settings → Custom Code → Head Code. Paste the lottie-player script. This loads the custom element for the whole page.
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>In the Webflow designer, open the Assets panel and upload your Lottie JSON file. Copy the URL it generates — you'll need it in the next step.
Add an HTML Embed element to your page. Paste the lottie-player tag with your JSON URL in the src attribute.
<lottie-player
src="https://your-domain.com/your-animation.json"
background="transparent"
speed="1"
style="width: 150px; height: 150px;"
loop
autoplay>
</lottie-player>Add the hover attribute to the lottie-player element instead of autoplay. The animation plays when a user hovers over it.
<lottie-player
src="https://your-domain.com/your-animation.json"
background="transparent"
speed="1"
style="width: 150px; height: 150px;"
loop
hover>
</lottie-player>Custom code requires a paid Webflow plan
The Head Code field and Embed elements only work in published output on paid Webflow site plans. They render in the designer on all plans.
Do I need a paid plan?
Yes. Custom code in Head/Footer and published Embed elements require a paid Webflow site plan.
Where do I host the JSON?
Upload to Webflow Assets and copy the URL. Or use any public HTTPS URL — jsDelivr, your own CDN, S3 bucket.
How do I play on hover?
Replace autoplay with hover in the lottie-player attributes. Step 4 shows the exact markup.
Related guides
Get your animated icons
Browse icons ready for Webflow — free to download.