explaingit

michalsnik/aos

Analysis updated 2026-06-20

28,070JavaScriptAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

AOS adds scroll-triggered animations to any webpage element, just add a data attribute to your HTML and elements fade, slide, or flip into view as the user scrolls.

Mindmap

mindmap
  root((AOS))
    What it does
      Scroll animations
      CSS3 transitions
      Auto reset on scroll up
    How to use
      data-aos attribute
      AOS.init call
      Per-element options
    Animation types
      Fade
      Slide
      Flip
      Zoom
    Use cases
      Landing pages
      Marketing sites
      Portfolio sites
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add fade-in and slide-up animations to a landing page or marketing site without writing custom animation code.

USE CASE 2

Trigger different animations on individual sections of a page as the visitor scrolls past them.

USE CASE 3

Disable animations on mobile devices or slow connections using the built-in disable option.

What is it built with?

JavaScriptCSS3

How does it compare?

michalsnik/aosjashkenas/backbonefanmingming/live
Stars28,07028,07627,992
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Link the AOS CSS, include the JS, call AOS.init(), no build step required.

Permissive open-source license, use freely in personal and commercial projects.

In plain English

AOS, short for "Animate on Scroll," is a small JavaScript library for adding animations to elements on a web page as the visitor scrolls. The idea is simple: as you scroll down, elements fade in, slide up, flip, zoom, or otherwise animate into view, and if you scroll back to the top, they animate back to their previous state and are ready to play again the next time you scroll past them. The author describes the effect as similar to WOWJS, but built around a different idea: the animations are driven by CSS3 rather than by JavaScript moving things frame by frame. In practice, you install AOS through npm or bower, link its CSS file, include its JavaScript file, and then call AOS.init() once on your page. To animate any element you add a data-aos attribute to the HTML, for example data-aos="fade-up" or data-aos="flip-left", and that element will animate using the chosen built-in animation when it scrolls into view. Extra data attributes let you tune individual elements: data-aos-offset to trigger sooner or later, data-aos-duration for how long the animation lasts, data-aos-easing to change the timing curve, data-aos-delay to pause before starting, data-aos-anchor to tie the trigger point to a different element, data-aos-anchor-placement to control which part of the element must hit which part of the viewport, and data-aos-once to play only the first time. You can also pass an options object to AOS.init() to set defaults for the whole page, and a disable option lets you turn AOS off on mobile or under any custom condition. The library exposes init, refresh, and refreshHard methods, the last two used to recalculate positions when the page changes. It is built as a UMD module so it can be loaded as AMD, a global script, a Node module, or an ES6 import. You would use AOS when you want polished scroll animations on a landing page or marketing site without writing the animation logic yourself.

Copy-paste prompts

Prompt 1
Using AOS (Animate on Scroll), show me the HTML and JS setup to make a hero section fade up and a card grid flip in as the user scrolls.
Prompt 2
Write the AOS.init() call with options to set a default duration of 800ms, easing of ease-in-out, and disable animations on mobile screens.
Prompt 3
Give me an HTML example using data-aos attributes to stagger three feature cards so each one slides up with a 100ms delay between them.
Prompt 4
Show me how to use data-aos-anchor-placement to trigger an animation only when the top of an element reaches the center of the viewport.

Frequently asked questions

What is aos?

AOS adds scroll-triggered animations to any webpage element, just add a data attribute to your HTML and elements fade, slide, or flip into view as the user scrolls.

What language is aos written in?

Mainly JavaScript. The stack also includes JavaScript, CSS3.

What license does aos use?

Permissive open-source license, use freely in personal and commercial projects.

How hard is aos to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is aos for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub michalsnik on gitmyhub

Verify against the repo before relying on details.