How to add a Lottie animation
To add a Lottie animation in TeleportHQ, add the Lottie element from the Elements panel's Media group to your page. Then, in the right panel, paste the animation's JSON link into the src field of the Attributes section. You can make it play automatically, loop, change speed or play on hover.
Before you start
- You need a link to a Lottie animation file (a
.jsonfile). For example, from LottieFiles: open an animation and copy its Lottie Animation URL. - Lottie animations are available on every plan and in websites and web apps.
Steps
- On the canvas, select the container that should hold the animation. For example, the column next to your opening text.
- In the left sidebar, click Elements, then the Primitives tab.
- In the Media group, click Lottie, or drag it onto the canvas where you want it. It appears as a square with a sample animation, and it's selected.
- In the right panel, find the Attributes section.
- Click the src field and paste your animation link. For example,
https://lottie.host/4db68bbd/checkmark.json. - Press Enter. The new animation plays on the canvas.
Change how it plays
In the Attributes section of the TeleportHQ right panel:
- autoplay: play as soon as the page loads. On by default.
- loop: repeat the animation.
- speed:
1is normal speed,2is twice as fast,0.5is half speed. - background: a background color behind the animation. Transparent by default.
- hover: play the animation when a visitor points at it.
You can size, position and space the Lottie element like any other element. To make it fade or slide in as visitors scroll to it, select it and use Add motion… in the Motion section. See How to animate any element (Add motion).
Check that it worked
Your animation shows on the canvas in place of the sample. Open Preview to check autoplay, loop and hover as a visitor would see them. See How to preview your site before publishing.
Troubleshooting
The sample animation still shows, or the element is empty The src field needs a direct link to a .json Lottie file. A link to a LottieFiles web page doesn't work. On LottieFiles, copy the Lottie Animation URL, which ends in .json.
I want to change the animation's colors You can't edit a Lottie animation's colors in TeleportHQ. Change them in LottieFiles or your animation tool, then use the new link.
Good to know
- The src field takes a web address. You can host the
.jsonfile in the Assets Manager: upload it, choose Copy Asset Link to Clipboard in its menu and paste the link into src. The file must be valid JSON, and your plan's file size limit applies. See How to link to a file so visitors can download it. - There is no replace button for Lottie animations in the Assets Manager. To swap the animation, paste a new link into src.
- Lottie animations keep playing for visitors who turn on "reduce motion" on their device. If that matters for your site, turn off loop. See What do visitors who turn on reduced motion see?