AOS (Animate On Scroll) is a lightweight JavaScript library that adds scroll-triggered animations to HTML elements using CSS3 transitions. It lets developers attach fade, flip, zoom, and other animation effects to elements that activate as the user scrolls through a page.
The library works by reading custom data attributes placed directly in HTML markup. Developers add attributes like data-aos to define the animation type and optional attributes to control duration, delay, easing, and offset. This approach keeps animation logic out of JavaScript files and inside the HTML structure.
You include the AOS CSS and JavaScript files in your HTML page through a CDN link or a package manager. You add the data-aos attribute to any element you want to animate — for example data-aos="fade-up — and optionally set attributes like data-aos-duration, data-aos-delay, data-aos-offset, data-aos-easing, or data-aos-anchor-placement to fine-tune behavior. You then call AOS.init() in a script tag to initialize the library. As the user scrolls, the library applies the pre-configured CSS3 transitions when each element scrolls into the viewport.
AOS is best suited for developers who want scroll-triggered CSS3 animations with minimal configuration and no JavaScript animation code. The library is open source, dependency-free, and installable through multiple package managers and CDN sources. It is a pure front-end library with no backend, pricing, or support tiers — all features are available to anyone who downloads or links the files.
Choose from fade, flip, zoom, and fade-zoom animation presets applied via the data-aos attribute.
Set animation duration in milliseconds using the data-aos-duration attribute on any element.
Delay animation start by a specified number of milliseconds using the data-aos-delay attribute.
Define how many pixels above the element viewport triggers the animation using data-aos-offset.
Choose easing functions like ease-in-sine, ease-in-back, ease-out-cubic, linear, and others through the data-aos-easing attribute.
Control when the animation triggers relative to the element's or anchor element's position using data-aos-anchor-placement.
Bind an animation's trigger point to a different element's scroll position rather than its own using the data-aos-anchor attribute.
Include AOS via Yarn, npm, Bower, or a CDN link from unpkg with only a CSS file and a JavaScript file.
Activate the library by calling AOS.init() with no required arguments — no external JavaScript configuration needed.
A AOSThis | ||||
|---|---|---|---|---|
| Starting price | — | Free | Free | Free |
| Pricing model | unknown | Free | Free | Free |
| Platforms | — | Web | Web, macOS, Windows, Linux | — |
| Top features |
|
|
|
|
| Rating | — | — | — | — |
Weekly newsletter of curated resources to help programmers learn something new every Monday
A weekly podcast exploring the intersection of society, culture, and crypto.
A tiny radio show about design, architecture, and the 99% invisible activity that shapes our world
Philadelphia-based creative director with 25 years of design experience, brand identity work for the...
Free podcast, newsletter, and job board to help marketing designers improve skills, get inspired, an...