Jump to content


Animate an element When it enters the viewport

Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Are there any posts or howtos on animating an element when it enters the viewport? So, scrolling the page, it enters the viewport and then animates. I’ll figure out an animation but would like to know how to have an element only animate when it enters the viewport on scroll.

Link to comment
Share on other sites

Hi @benjino :)


If you want to use a 3rd party library, ScrollMagic is good for that kind of thing. You can search the forum for "ScrollMagic" and you'll find lots of threads about it.



If you don't want a 3rd party library, @OSUblake has some options in this thread:

You may also want to keep an eye on this thread in which we're having a discussion about the new Intersection Observer API


Hopefully that gets you started. Happy tweening.


  • Like 1
  • Thanks 1
Link to comment
Share on other sites



I was using viewportChecker and animate.css but today the latest version of Chrome for OSX wasn't cooperating. I'll try one of these.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.