Lottie Animation in Elementor - Free and Pro Methods

Elementor has a built-in Lottie widget, but it's locked behind Elementor Pro, a paid plan. If you're on Elementor Free - or just want a lighter approach that doesn't depend on Elementor's widget system - there's another way.
OneType Transforms adds Lottie support through a CDN script and HTML attributes. It works with Elementor's free HTML widget - no Pro required for the widget itself. You get scroll triggers, hover interactions, and click-to-play without writing any JavaScript.
How to add Lottie animations in Elementor
Step 1: Add the script tag
Elementor Pro users: go to WordPress Dashboard > Elementor > Custom Code. Click Add New, name it "OneType Transforms", and paste:
<script src="https://cdn.transforms.onetype.ai/bundle/{YOUR-TOKEN}.js"></script>
Set Location to "Body - End", Priority to 1, Conditions to "Entire Site". Click Publish.
Elementor Free users: install the free WPCode plugin instead. Go to Code Snippets > Header & Footer, paste the script tag in the Header section, and save.
Lottie is a premium transform - you need a paid plan (their pricing). Get your token at transforms.onetype.ai/get-started.
Step 2: Add the Lottie animation using the HTML widget
- Open any page in the Elementor editor
- In the left panel, search for "HTML"
- Drag the HTML widget (icon: ) where you want the animation
- Paste this in the text area:
<div ot="lottie" ot-path="https://assets2.lottiefiles.com/packages/lf20_UJNc2t.json" style="width: 200px; height: 200px;"></div>
Replace the URL with any Lottie JSON file from LottieFiles. The HTML widget is available in Elementor Free - no Pro needed.
Step 3: Preview
Click Preview in Elementor to see the animation running. The HTML widget renders live in the editor, so you should see the Lottie playing right away.
Elementor Pro alternative: custom attributes
If you have Elementor Pro, there's a second method. Instead of the HTML widget, you can add custom attributes directly to any Elementor element.
- Select any element (Container, Widget, or Section)
- Go to the Advanced tab in the left panel
- Scroll to the Attributes section
- Add attributes in key|value format, one per line:
ot|lottie
ot-path|https://assets2.lottiefiles.com/packages/lf20_UJNc2t.json
This approach works for simple setups, but Lottie needs a container div with specific dimensions. The HTML widget gives you more control over the sizing and layout.
Adding triggers: scroll, hover, click
Instead of autoplaying, you can trigger Lottie animations based on user interaction. Add these attributes to the HTML widget code:
Scroll trigger - plays when the user scrolls to it:
<div ot="lottie" ot-path="animation.json" ot-trigger="scroll" ot-loop="false" style="width: 200px; height: 200px;"></div>
Hover trigger - plays forward on hover, reverses on mouse leave:
<div ot="lottie" ot-path="animation.json" ot-trigger="hover" ot-hover-action="reverse" style="width: 200px; height: 200px;"></div>
Click trigger - click to toggle play/pause:
<div ot="lottie" ot-path="animation.json" ot-trigger="click" style="width: 200px; height: 200px; cursor: pointer;"></div>
These triggers are not available in Elementor's built-in Lottie widget. Scroll, hover, and click interactions are unique to the OneType approach.
OneType Lottie vs Elementor Lottie widget
- Elementor Lottie widget - Pro only (paid), drag-and-drop setup, limited trigger options, tied to Elementor
- OneType Lottie - works on Free and Pro, HTML-based, scroll/hover/click triggers, platform-independent (same code works if you switch to Gutenberg, Divi, or anything else)
If you're already paying for Elementor Pro, you can use their widget for simple animations. But if you want interactive triggers or plan to ever move away from Elementor, the HTML attribute approach won't lock you in.
Full configuration reference
All Lottie configuration options - speed, direction, renderer, triggers - are covered in the main Lottie animation guide.
Get started
Lottie is a premium transform on OneType Transforms. Grab a a paid plan (their pricing), get your script tag from the get started page, and drop Lottie animations into your Elementor pages.