Audience
Developers interested in an open-source solution offering scrolling animations
About Animate On Scroll (AOS)
Animate on scroll library. In order to make it work, you'll have to make sure your build process has configured styles loader and bundles it all correctly. If you're using Parcel, however, it will work out of the box as provided. AOS object is exposed as a global variable, for now, there are three methods available. Initialize AOS, recalculate all offsets and positions of elements (called on window resize), reinitiate the array with AOS elements, and trigger refresh (called on DOM changes that are related to AOS elements). By default, AOS is watching for DOM changes and if there are any new elements loaded asynchronously or when something is removed from DOM it calls refreshHard automatically. In browsers that don't support MutationObserver like IE, you might need to call it by yourself. You can also tell AOS to trigger a custom event on a specific element. You can also add custom animations.