A lightweight JavaScript library for animating elements on scroll with CSS-driven transitions.
AOS (Animate On Scroll) is a lightweight JavaScript library that detects page scrolling and triggers smooth CSS animations on elements as they enter or leave the viewport. It provides an easy way to add engaging scroll-based animations to websites without heavy dependencies or complex configurations. The library focuses on simplicity and performance, leveraging CSS for hardware-accelerated transitions while keeping the JavaScript footprint minimal.
Web developers and designers looking to add scroll-triggered animations to websites with minimal setup, particularly those working on marketing sites, portfolios, or content-heavy pages where visual engagement is a priority.
Developers choose AOS for its straightforward, declarative HTML attribute-based setup, extensive library of built-in animations, and fine-grained control over animation timing and behavior without requiring deep JavaScript knowledge. Its small size, performance focus, and ability to integrate with external CSS animation libraries like Animate.css offer flexibility without bloat.
Animate on scroll library
Offers a wide range of predefined animations like fades, flips, slides, and zooms, making it easy to add effects without writing custom CSS from scratch, as listed in the animations section.
Allows fine-tuning per element with HTML data attributes for offset, delay, duration, easing, and anchor placement, enabling precise adjustments without JavaScript coding, demonstrated in the usage examples.
Focuses on simplicity with minimal JavaScript, leveraging CSS for hardware-accelerated transitions to ensure smooth animations while keeping the library small and fast, as emphasized in the philosophy.
Dispatches custom JavaScript events (aos:in, aos:out) for advanced integrations, allowing developers to trigger other actions based on animation states, as shown in the JS Events section.
Supports custom animations, easing functions, and seamless integration with external CSS libraries like Animate.css, providing flexibility for advanced use cases, as detailed in the recipes.
Duration and delay values are restricted to steps of 50ms from 50 to 3000, which may not accommodate all timing needs without custom CSS overrides, as noted in the caveats.
In applications with asynchronous DOM changes, AOS requires explicit calls to refresh() or refreshHard() to detect new elements, adding complexity for dynamic or single-page apps.
While it uses CSS for animations, creating custom effects or integrating with other libraries often requires additional CSS setup, which might be a barrier for developers less familiar with CSS.
The library is designed solely for scroll-based animations, so it cannot natively handle other triggers like clicks or hovers without extra JavaScript workarounds.
Animate elements as they scroll into view.
The javascript library for magical scroll interactions.
Simple & lightweight (<4kb gzipped) vanilla JavaScript library to create smooth & beautiful animations when you scroll.
Reveal CSS animation as you scroll down a page
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.