How to Play Lottie Animation on Page Scroll in WordPress?

Key Takeaways

  • Nexter Blocks includes the LottieFiles Animation block, enabling animations to play on scroll in WordPress.
  • Users can set a custom animation duration and offset for the scroll animation using the Custom Height option.
  • Selecting Document Height allows for a fixed scroll animation effect by adjusting the block position and z-index value.
Table of Contents

Do you want to play the Lottie animation on page scroll in WordPress? Triggering Lottie animations on scroll adds interactivity to your website, making the animation come to life as users navigate the page, creating a more engaging and dynamic browsing experience.

With the LottieFiles Animation block from Nexter Blocks, you can easily play the Lottie animations as users scroll in WordPress.

To check the complete feature overview documentation of the Nexter Blocks LottieFiles Animation block, click here.

Requirement  – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.

To do this, add the LottieFiles Animation block to the page and follow the steps – 

1. In the Lottie Content tab, select the appropriate JSON input type and add the Lottie animation.

2. Then select Scroll Parallax from the Play On dropdown under the Main Settings tab.

Note: Make sure to disable the Loop Animation toggle, so the animation doesn’t play in a loop.

3. Then, from the On Scroll Height section, you have to select the height type for the scroll. Here you’ll find two options – 

  • Custom Height – With this option, you can set a custom animation duration and offset for the scroll animation.
  • Document Height – This will start and end animation based on the entire document height.

Select the option as per your requirements, let’s select Custom Height here.

4. In the Duration field, you can set the animation duration in pixels, i.e. the animation will play for an equivalent number of pixels set here as you scroll.

5. Then in the Offset field, you can set an offset value, i.e. the distance from the top of the browser where the animation starts.

For instance, if you set 500 and 100 in the Duration and Offset fields respectively, that means the animation will start 100 pixels before the top of the browser and it will continue for 500 pixels as you scroll down. 

If you scroll up, it will reverse the animation.

Now, based on your settings, the animation will play back and forth as you scroll down and up.

If you’ve selected Document Height, you can make an even more interesting fixed scroll animation effect. 

For this, you have to set the LottieFiles Animation block position to fixed from the Advanced tab and adjust the necessary z-index value.

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What should I do if my Lottie animation is not playing on scroll?

If your Lottie animation isn't playing on scroll, ensure that you've selected 'Scroll Parallax' from the 'Play On' dropdown under the Main Settings tab. Additionally, check that the 'Loop Animation' toggle is disabled, as this can prevent the animation from functioning correctly. If these settings are correct, review your scroll height settings to confirm they align with your intended animation behavior.

What is the best way to set the duration and offset for my Lottie animation?

For optimal results, set the animation duration and offset based on your content layout. If you want the animation to start at a specific point, adjust the Offset field to determine where it begins. The Duration field should reflect how long you want the animation to play as the user scrolls. For example, setting a duration of 500 pixels and an offset of 100 pixels means the animation starts 100 pixels from the top and plays for 500 pixels down the page.

Are there any limitations when using the LottieFiles Animation block?

One limitation to be aware of is that the LottieFiles Animation block is part of Nexter Blocks, so you must have it installed and activated to use this feature. Additionally, the animation behavior is dependent on the scroll settings you configure, so improper settings may lead to unexpected results in animation playback.

How do I add a Lottie animation to my WordPress page?

To add a Lottie animation to your WordPress page, use the LottieFiles Animation block from Nexter Blocks. In the Lottie Content tab, input the appropriate JSON for your animation. Then, configure the settings under the Main Settings tab, including selecting 'Scroll Parallax' and adjusting the scroll height options to suit your needs. This process enhances user engagement by making your animations interactive.

Last reviewed: April 14, 2026

Related Docs