Animate on scroll library

Overview

AOS - Animate on scroll library

NPM version NPM downloads Build Status Gitter

Twitter Follow Twitter URL

This is README for aos@next

For last stable release (v2) go here


🚀 Demo

🌟 Codepen Examples

👉 To get a better understanding how this actually works, I encourage you to check my post on CSS-tricks.


Installation

Basic

Add styles in <head>:

  <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />

Add script right before closing </body> tag, and initialize AOS:

  <script src="https://unpkg.com/aos@next/dist/aos.js"></script>
  <script>
    AOS.init();
  </script>

Using package managers

Install aos package:

  • yarn add aos@next
  • or npm install --save aos@next

Import script, styles and initialize AOS:

import AOS from 'aos';
import 'aos/dist/aos.css'; // You can also use <link> for styles
// ..
AOS.init();

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.


🤔 How to use it?

1. Initialize AOS:

AOS.init();

// You can also pass an optional settings object
// below listed default settings
AOS.init({
  // Global settings:
  disable: false, // accepts following values: 'phone', 'tablet', 'mobile', boolean, expression or function
  startEvent: 'DOMContentLoaded', // name of the event dispatched on the document, that AOS should initialize on
  initClassName: 'aos-init', // class applied after initialization
  animatedClassName: 'aos-animate', // class applied on animation
  useClassNames: false, // if true, will add content of `data-aos` as classes on scroll
  disableMutationObserver: false, // disables automatic mutations' detections (advanced)
  debounceDelay: 50, // the delay on debounce used while resizing window (advanced)
  throttleDelay: 99, // the delay on throttle used while scrolling the page (advanced)
  

  // Settings that can be overridden on per-element basis, by `data-aos-*` attributes:
  offset: 120, // offset (in px) from the original trigger point
  delay: 0, // values from 0 to 3000, with step 50ms
  duration: 400, // values from 0 to 3000, with step 50ms
  easing: 'ease', // default easing for AOS animations
  once: false, // whether animation should happen only once - while scrolling down
  mirror: false, // whether elements should animate out while scrolling past them
  anchorPlacement: 'top-bottom', // defines which position of the element regarding to window should trigger the animation

});

2. Set animation using data-aos attribute:

  <div data-aos="fade-in"></div>

And adjust behaviour by using data-aos-* attributes:

  <div
    data-aos="fade-up"
    data-aos-offset="200"
    data-aos-delay="50"
    data-aos-duration="1000"
    data-aos-easing="ease-in-out"
    data-aos-mirror="true"
    data-aos-once="false"
    data-aos-anchor-placement="top-center"
  >
  </div>

See full list of all animations, easings and anchor placements

Anchor

There is also a setting that can be used only on per-element basis:

  • data-aos-anchor - element whose offset will be used to trigger animation instead of an actual one.

Examples:

<div data-aos="fade-up" data-aos-anchor=".other-element"></div>

This way you can trigger animation on one element, while you scroll to another - useful in animating fixed elements.


API

AOS object is exposed as a global variable, for now there are three methods available:

  • init - initialize AOS
  • refresh - recalculate all offsets and positions of elements (called on window resize)
  • refreshHard - reinit array with AOS elements and trigger refresh (called on DOM changes that are related to aos elements)

Example execution:

  AOS.refresh();

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 AOS.refreshHard() by yourself.

refresh method is called on window resize and so on, as it doesn't require to build new store with AOS elements and should be as light as possible.


JS Events

AOS dispatches two events on document: aos:in and aos:out whenever any element animates in or out, so that you can do extra stuff in JS:

document.addEventListener('aos:in', ({ detail }) => {
  console.log('animated in', detail);
});

document.addEventListener('aos:out', ({ detail }) => {
  console.log('animated out', detail);
});

You can also tell AOS to trigger custom event on specific element, by setting data-aos-id attribute:

<div data-aos="fade-in" data-aos-id="super-duper"></div>

Then you'll be able to listen for two custom events then:

  • aos:in:super-duper
  • aos:out:super-duper

Recipes:

Adding custom animations:

Sometimes built-in animations are just not enough. Let's say you need one box to have different animation depending on resolution. Here's how you could do it:

[data-aos="new-animation"] {
  opacity: 0;
  transition-property: transform, opacity;

  &.aos-animate {
    opacity: 1;
  }

  @media screen and (min-width: 768px) {
    transform: translateX(100px);

    &.aos-animate {
      transform: translateX(0);
    }
  }
}

Then use it in HTML:

<div data-aos="new-animation"></div>

The element will only animate opacity on mobile devices, but from 768px width it'll also slide from right to left.

Adding custom easing:

Similar to animations you can add custom easings:

[data-aos] {
  body[data-aos-easing="new-easing"] &,
  &[data-aos][data-aos-easing="new-easing"] {
    transition-timing-function: cubic-bezier(.250, .250, .750, .750);
  }
}

Customizing default animations distance

Default distance for built-in animations is 100px. As long as you're using SCSS though, you can override it:

$aos-distance: 200px; // It has to be above import
@import 'node_modules/aos/src/sass/aos.scss';

You have to however configure your build process to allow it to import styles from node_modules beforehand.

Integrating external CSS animation library (e.g. Animate.css):

Use animatedClassName to change default behaviour of AOS, to apply class names placed inside data-aos on scroll.

<div data-aos="fadeInUp"></div>
AOS.init({
  useClassNames: true,
  initClassName: false,
  animatedClassName: 'animated',
});

The above element will get two classes: animated and fadeInUp. Using different combinations of the three above settings, you should be able to integrate any external CSS animation library.

External libraries however don't care too much about animation state before the actual animation. So if you want those elements to be not visible before scrolling, you might need to add similar styles:

[data-aos] {
  visibility: hidden;
}
[data-aos].animated {
  visibility: visible;
}

Caveats:

setting: duration, delay

Duration and delay accept values from 50 to 3000, with step 50ms, it's because those are handled by css, and to not make css longer than it is already I implemented only a subset. I believe those should cover most cases.

If not, you can write simple CSS that will add another duration, for example:

  body[data-aos-duration='4000'] [data-aos],
  [data-aos][data-aos][data-aos-duration='4000'] {
    transition-duration: 4000ms;
  }

This code will add 4000ms duration available for you to set on AOS elements, or to set as global duration while initializing AOS script. Notice that double [data-aos][data-aos] - it's not a mistake, it is a trick, to make individual settings more important than global, without need to write ugly "!important" there :)

Example usage:

  <div data-aos="fade-in" data-aos-duration="4000"></div>

Predefined options

Animations

  • Fade animations:

    • fade
    • fade-up
    • fade-down
    • fade-left
    • fade-right
    • fade-up-right
    • fade-up-left
    • fade-down-right
    • fade-down-left
  • Flip animations:

    • flip-up
    • flip-down
    • flip-left
    • flip-right
  • Slide animations:

    • slide-up
    • slide-down
    • slide-left
    • slide-right
  • Zoom animations:

    • zoom-in
    • zoom-in-up
    • zoom-in-down
    • zoom-in-left
    • zoom-in-right
    • zoom-out
    • zoom-out-up
    • zoom-out-down
    • zoom-out-left
    • zoom-out-right

Anchor placements:

  • top-bottom
  • top-center
  • top-top
  • center-bottom
  • center-center
  • center-top
  • bottom-bottom
  • bottom-center
  • bottom-top

Easing functions:

  • linear
  • ease
  • ease-in
  • ease-out
  • ease-in-out
  • ease-in-back
  • ease-out-back
  • ease-in-out-back
  • ease-in-sine
  • ease-out-sine
  • ease-in-out-sine
  • ease-in-quad
  • ease-out-quad
  • ease-in-out-quad
  • ease-in-cubic
  • ease-out-cubic
  • ease-in-out-cubic
  • ease-in-quart
  • ease-out-quart
  • ease-in-out-quart

Questions

If you found a bug, have a question or an idea, please check AOS contribution guide and don't hesitate to create new issues.

Comments
  • Content not showing up at all

    Content not showing up at all

    Hi, just wanted to say before I ask my question, you've made such an awesome plugin, thank you so much. Now my question is:

    I can't seem to get your plugin to work with my code. The content I assign the data-aos tag to just stay at an opacity of 0, no matter what I do. This is my code:

    Smart Living Symposium
    <link href='https://fonts.googleapis.com/css?family=Lato:400,300' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="jquery.waypoints.min.js"></script>
    <script src="bootstrap.min.js"></script>
    <script src="master.js"></script>
    <script src="aos.js"></script>
    
    <link href='aos.css' rel='stylesheet' type='text/css'>
    
    <div class="section2">
    	<div id="textLeft" data-aos="fade-left"></div>
    </div>
    <div class="section3">
    
    </div>
    <div class="section4">
    
    </div>
    
    <div id="menu">
    	<ul>
    		<li class="nav_item"><a id="homeL" href="">Home</a></li>
    		<li class="nav_item"><a id="thisYearL" href="">This Year</a></li>
    		<li class="nav_item"><a id="companiesL" href="">Companies</a></li>
    		<li class="nav_item"><a id="studyL" href="">Study</a></li>
    		<li class="nav_item"><a id="unionL" href="">Union</a></li>
    		<li class="nav_item"><a id="prevYearL" href="">Previous Years</a></li>
    		<li class="nav_item"><a id="contactL" href="">Contact</a></li>
    	</ul>
    </div>
    
    opened by rinus2107 51
  • Run javascript function instead of css animation?

    Run javascript function instead of css animation?

    Hi.

    Thanks again for a great plugin. Just wonder, is it possible to run a javascript function on the element instead of a css animation? Would be great to have the flexibility...

    feature request 
    opened by felixbridell 36
  • how to integrate with vue.js

    how to integrate with vue.js

    I have html page with AOS animation. The page is complete static. Then I tried to integrated to vue.js to dynamically change some text and html components. But when add vue,js app then AOS stopped working. Are there anyone who already figured out how to integrate AOS and VUE together?

    opened by gantulgan 25
  • Mobile format has an blank space added to the right outside of viewport after adding AOS

    Mobile format has an blank space added to the right outside of viewport after adding AOS

    This is:

    • Bug / - Question

    Specifications

    • AOS version: aos V 2.0
    • OS: Mobile format galaxy S8+, iPhone 8+, samsung galaxy tab
    • Browser: Chrome / Samsung internet browser

    Expected Behavior

    Pages were mobile responsive before using AOS

    Actual Behavior

    AOS is creating a blank space to the right of page of mobile devices. Laptop screens work as expected

    Steps to Reproduce the Problem

    http://dninstalls.com/

    image

    Possible Solution

    Tried aos@next, did not fix. Tried adding this to CSS / HTML did not fix CSS .aos-init:not(.aos-animate):after { position: fixed; } HTML < div class="aos-init" data-aos="zoom-in-up" data-aos-duration="3000" >

    opened by djneill 24
  • Sorry for the noob question - How to setup on wordpress?

    Sorry for the noob question - How to setup on wordpress?

    Hey,

    Again, sorry to waste your time with such a noob question but I'm having trouble loading AOS. I was hoping someone will be kind enough to help me out.

    I pasted the following java in my theme-options > external js field

    <script src="bower_components/aos/dist/aos.js"></script>

    and the following HTML on the top of the page I want my AOS to appear on: <link rel="stylesheet" href="bower_components/aos/dist/aos.css" />

    but when I add the data-aos attribute to the html element, the element simply doesn't show up.

    Sorry to waste your time!

    question 
    opened by vassil-stoimenov 23
  • Update webpack to the latest version 🚀

    Update webpack to the latest version 🚀

    Version 3.5.4 of webpack just got published.

    Dependency webpack
    Current Version 1.15.0
    Type devDependency

    The version 3.5.4 is not covered by your current version range.

    Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

    I recommend you look into these changes and try to get onto the latest version of webpack. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


    Release Notes v3.5.4

    Bugfixes

    • Warnings and errors contribute to hash, which shows stats on warning-only change
    • HMR: avoid crash when calling accept handler on disposed module
    • HMR: disable Scope Hoisting for modules using HMR
    • restore backwards compatibility of ConcatenatedModule (@kisenka)

    Features:

    • Add option to limit the number of parallel processed modules (parallelism)
    Commits

    The new version differs by 2962 commits ahead by 2962, behind by 77.

    • 990563f 3.5.4
    • 2475c6a Merge pull request #5506 from webpack/bugfix/concat-hmr
    • 0ea37a5 Disallow Scope Hoisting when using HMR
    • 287d587 Merge pull request #5480 from kisenka/concatenated-module-in-3.5-compat
    • 3d272ac fix: restore modules property of ConcatenatedModule (fixes #5477)
    • 7a36951 Merge branch 'master' of https://github.com/webpack/webpack into concatenated-module-in-3.5-compat
    • 839915c Merge pull request #5501 from webpack/bugfix/hash-watch-warnings-errors
    • 93af585 fix stats tests
    • 3820157 fix lint problem
    • 0925a9d Merge pull request #5502 from webpack/feature/limit-processed-modules
    • 09c34cf remove hash from stats test with error
    • 930c019 fix validation output test
    • f9bf8a9 Limit the number of parallel processed modules
    • 7905bf5 Warnings and Errors contribute to hash
    • f7bcba7 Merge pull request #5500 from webpack/bugfix/hmr-disposed-handler

    There are 250 commits in total.

    See the full diff

    Not sure how things should work exactly?

    There is a collection of frequently asked questions and of course you may always ask my humans.


    Your Greenkeeper Bot :palm_tree:

    documentation 
    opened by greenkeeper[bot] 23
  • Working AOS in with React.

    Working AOS in with React.

    Love the looks of this little library. I'm unsure if I'm missing something completely obvious, but haven't had any luck implementing this with react.

    I'm using create-react-app.

    I have a long product page, with lots of sections, each one being rendered by it's own react functional component, that looks relatively like this:

    import React from 'react';
    import './XYZ.css';
    import XYZImg from './assets/XYZ.png';
    import AOS from 'aos'
    
    const ProductXYZ = () => {
    
      AOS.init()
    
      return(
      <section className="Product-XYZ">
        <div className="content XYZ-container">
    
          <img className="product-img" data-aos="fade-zoom-in" alt="XYZ" src={XYZImg} />
    
          <section className="XYZ-details">
            <h2 className="product-header">  Lorem ipsum etc. </h2>
            <p className="product-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit, .</p>
          </section>
    
        </div>
      </section>
      )
    
    }
    
    export default ProductXYZ;
    

    I've tried initing AOS on the parent level component and in a per component basis but neither have had any luck getting an image / html element to animate in on scroll.

    Anything I'm missing?

    Thanks!!

    edit: extra notes

    • create react app uses webpack - but the .config file is not exposed unless you eject your project. So I haven't looked into how that might make a difference...
    unconfirmed 
    opened by teesloane 23
  • Animate.css integration

    Animate.css integration

    Going with the modular pattern of the animate-on-scroll practice, perhaps it would be a good idea to separate out the actual animation CSS, so it can be replaced with a dedicated animation library such as Animate.css.

    feature request 
    opened by aalaap 22
  • Z - index (content overlapping) problem

    Z - index (content overlapping) problem

    i have added AOS animation for every section. some section contains dropdown (bootstrap select picker), that produces dropdown div. but the problem is, the content which animates later than the content which has dropdown is overlapping dropdown menu. I tried removing AOS, its working fine. Tried with changing z-index no luck. finally end up with removing AOS for now.

    bug 
    opened by ltsharma 20
  • Update webpack-dev-server to the latest version 🚀

    Update webpack-dev-server to the latest version 🚀

    Version 2.8.0 of webpack-dev-server just got published.

    Dependency webpack-dev-server
    Current Version 1.16.5
    Type devDependency

    The version 2.8.0 is not covered by your current version range.

    Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

    I recommend you look into these changes and try to get onto the latest version of webpack-dev-server. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


    Release Notes v2.8.0

    Features

    • Print webpack progress to browser console (#1063)
    • Disable hot reloading with query string (#1068)

    Bugfixes

    • Fixes issue #1064 by switching to a named logger (#1070)
    • Fix Broken Socket on Client for Custom/Random Port Numbers (#1060)
    • Addresses #998 to properly assign a random port and access the port assigned (#1054)
    • Don't generate ssl cert when one is already specified via options (#1036)
    • Fix for ./log module not found (#1050)
    • Fixes #1042: overlay doesn't clear if errors are fixed but warnings remain (#1043)
    • Handle IPv6-addresses correctly in checkHost() (#1026)

    Updates

    • Allow --open option to specify the browser to use (#825)
    • Adds requestCert support to the server
    • Code cleanup and ESLint + eslint-config-webpack (#1058)
    • Include subjectAltName field in self-signed cert (#987)
    Commits

    The new version differs by 315 commits ahead by 315, behind by 46.

    • 0df1fa7 2.8.0
    • ccef0d1 Print webpack progress to browser console (#1063)
    • d3a650f include subjectAltName field in self-signed cert (#987)
    • e519cf2 Add feature to disable hotReloading with query string (#1068)
    • f166177 Fixes issue #1064 by switching to a named logger (#1070)
    • f00fcb3 Allow --open option to specify the browser to use (#825)
    • cf5dda8 improving requestCert description
    • 2b760f6 Merge branch 'dbk91-request_cert_support'
    • 11a3e63 Merge branch 'request_cert_support' of https://github.com/dbk91/webpack-dev-server into dbk91-request_cert_support
    • 0fa8fea Fix Broken Socket on Client for Custom/Random Port Numbers (#1060)
    • 1201ac1 addresses #998 to properly assign a random port and access the port assigned (#1054)
    • 69239ce Cleanup Effort (#1058)
    • e6ccbaf No longer generating ssl cert when one is already specified (#1036)
    • 0b4729f Proposed fix for ./log module not found (#1050)
    • b2cf847 fixes #1042: overlay doesn't clear if errors are fixed but warnings remain (#1043)

    There are 250 commits in total.

    See the full diff

    Not sure how things should work exactly?

    There is a collection of frequently asked questions and of course you may always ask my humans.


    Your Greenkeeper Bot :palm_tree:

    documentation 
    opened by greenkeeper[bot] 19
  • Uncaught ReferenceError: AOS is not defined

    Uncaught ReferenceError: AOS is not defined

    I am trying to add AOS library but its showing me error Uncaught ReferenceError: AOS is not defined and aos-animate class doesn't apply. I have also included file CSS and JS . <h1 data-aos="fade-up" data-aos-easing="delay-slide" data-aos-duration="1500" data-aos-delay="100" data-aos-offset="0">ABC</h1> <script> AOS.init({ easing: 'ease-out-back', duration: 1000 }); </script> I even tried $(function() { AOS.init(); }); window.addEventListener('load', AOS.refresh);

    unconfirmed 
    opened by theromie 14
  • Problems with aos animation activation on laptop and mobile version(filters)

    Problems with aos animation activation on laptop and mobile version(filters)

    This is:

    • Bug

    Specifications

    • AOS version: latest
    • OS: Windows 10
    • Browser: Chrome

    Expected Behavior

    I want them to activate when scoll down to the card like on this website (portfolio section) https://krozo.ibthemespro.com/home-dark-animation#work

    Actual Behavior

    Animation suppose to activate when i scroll down to my div ,but when i use filters in my portfolio with cards it loads when only i scroll down more and when i go back to see cards they dissapear

    https://rawcdn.githack.com/ka1jo/my_exam/1f05965c5f98b051a32ac4e9e313930b764f8038/index.html

    opened by ka1jo 0
  • 滚动页面的时候,设置aos动画的dom无效。When scrolling the page, the dom for setting aos animation is invalid

    滚动页面的时候,设置aos动画的dom无效。When scrolling the page, the dom for setting aos animation is invalid

    This is: Bug

    • Bug
    • Feature request
    • Question
    • Idea

    Specifications

    • AOS version: 3.0.0-beta.6
    • OS: window11
    • Browser: google108

    Expected Behavior

    • 滚动页面的时候,设置aos动画的dom可以正常展示。
    • When scrolling the page, the dom with aos animation can display normally。

    Actual Behavior

    • 在页面div元素中设置高度,比如div {height:500px; overflow-y: auto;},此时内容很多,可以滚动,但是滚动之后的页面元素不展示。但是如果是浏览器自带滚动则是正常工作。
    • Set the height in the page div element, such as div {height: 500px; overflow y: auto;}, At this time, there is a lot of content that can be scrolled, but the page elements after scrolling are not displayed.However, if the browser comes with scrolling, it works normally

    Steps to Reproduce the Problem

    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    1. .ul { height: 500px; overflow-y: auto li { height: 100px } } image

    Detailed Description

    Possible Solution

    浏览器 自动出现滚动条的时候 是可以正常工作的,但是如果一个父元素设置了高度,就不正常, 是因为aos 监听滚动的时候使用了 document.addEventListener(options.startEvent, function() { refresh(true); });
    window.addEventListener('load', function() { refresh(true); }); 。

    The browser can work normally when the scrollbar automatically appears. However, if a parent element is set to a height, it is not normal. This is because aos monitors scrolling

    document.addEventListener(options.startEvent, function() { refresh(true); });
    window.addEventListener('load', function() { refresh(true); }); 。

    可以接受参数变成 : It is acceptable to change the parameter to: document.getElementById(id).addEventListener(options.startEvent, function() { refresh(true); });

    opened by webqd 1
  • Bump qs from 6.3.2 to 6.3.3

    Bump qs from 6.3.2 to 6.3.3

    Bumps qs from 6.3.2 to 6.3.3.

    Changelog

    Sourced from qs's changelog.

    6.3.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] Clean up license text so it’s properly detected as BSD-3-Clause
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] use safer-buffer instead of Buffer constructor
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • ff235b4 v6.3.3
    • 4310742 [Fix] parse: ignore __proto__ keys (#428)
    • da1eee0 [Dev Deps] backport from main
    • 2c103b6 [actions] backport actions from main
    • aa4580e [Robustness] stringify: avoid relying on a global undefined (#427)
    • f8510a1 [meta] fix README.md (#399)
    • 4c036ce [Fix] fix for an impossible situation: when the formatter is called with a no...
    • 180bfa5 [meta] Clean up license text so it’s properly detected as BSD-3-Clause
    • e0b2c4b [Tests] use safer-buffer instead of Buffer constructor
    • f7139bf [Fix] utils.merge: avoid a crash with a null target and an array source
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • anchorPlacement option does not work correctly

    anchorPlacement option does not work correctly

    When you added the following script:

    <script src="https://unpkg.com/[email protected]/dist/aos.js" defer onload="AOS.init({anchorPlacement:'top-center'})"></script>
    

    The anchorPlacement option is not set correctly, having the following html:

    <section>
        <div style="width: 200px;height:200px;display:inline-block" data-aos="zoom-in">
            DIV 1
        </div>
        
        <div style="width: 200px;height:200px;display:inline-block" data-aos="zoom-in" data-aos-anchor-placement="top-center">
            DIV 2
        </div>
    </section>
    

    The expected behavior is for them to appear and disappear at the same time, but the behavior of DIV 1 is incorrect.

    opened by mcolominas 0
  • For example if we have fade-left effect when we scroll down we get the effect of fade but when we scroll-up the fade effect gets reversed, which dowsn't look good

    For example if we have fade-left effect when we scroll down we get the effect of fade but when we scroll-up the fade effect gets reversed, which dowsn't look good

    This is:

    • Bug
    • Feature request
    • Question
    • Idea

    Specifications

    • AOS version:
    • OS:
    • Browser:

    Expected Behavior

    Actual Behavior

    Steps to Reproduce the Problem

    Detailed Description

    Possible Solution

    opened by Naman7213 0
Owner
Michał Sajnóg
Vue.js Core Team Member & Frontend Engineer @ RemoteHQ
Michał Sajnóg
Animate elements as they scroll into view.

Animate elements as they scroll into view. Introduction ScrollReveal is a JavaScript library for easily animating elements as they enter/leave the vie

null 21.2k Jan 4, 2023
Javascript library to animate images on hover.

Ripple Hover Effect Javascript library to animate images on hover. If this project help you, don't forget to star it. Codepen demo by Essam Abed Demo

Essam Abed 13 Nov 21, 2022
Small js library to animate some writing effect through a list of strings. It also supports settings for typo errors, to make it more human likely.

Write and Delete Small js library to animate some writing effect through a list of strings. It also supports settings for typo errors, to make it more

fabs 2 Nov 15, 2022
An easy way to animate SVG elements.

Walkway I loved the animations for the polygon ps4 review a few months back and decided to create a small library to re-create them (simple demo). It

Connor Atherton 4.4k Jan 2, 2023
animate.css as a Tailwind plugin

tailwind-animatecss Use animate.css as a Tailwind 3 plugin. Demo – https://dumptyd.github.io/tailwind-animatecss Table of contents Installation Usage

Saad 42 Dec 19, 2022
Animate your Alpine components.

Animate your Alpine components ?? This package provides you with a simple helper to animate your ALpine.js components. Installation The recommended wa

Ralph J. Smit 18 Nov 16, 2022
Quick and easy spring animation. Works with other animation libraries (gsap, animejs, framer motion, motion one, @okikio/animate, etc...) or the Web Animation API (WAAPI).

spring-easing NPM | Github | Docs | Licence Quick and easy spring animations. Works with other animation libraries (gsap, animejs, @okikio/animate, mo

Okiki Ojo 34 Dec 14, 2022
A lightweight script to animate scrolling to anchor links.

DEPRECATION NOTICE: Smooth Scroll is, without a doubt, my most popular and widely used plugin. But in the time since I created it, a CSS-only method f

Chris Ferdinandi 5.4k Dec 26, 2022
A jQuery plugin that works in harmony with animate.css in order to enable animations only when content comes into view.

jQuery AniView A jQuery plugin that works in harmony with animate.css in order to enable animations only when content comes into view. Now supports v4

Jonathan James Cosgrove 216 Sep 10, 2022
A JQuery plugin to animate text as in the credits of the 2014 movie "Birdman".

birdman.js A JQuery plugin to animate text as in the credits of the 2014 movie "Birdman". See it in action at chrisma.github.io/birdman.js I'm aware t

Christoph Matthies 33 Dec 30, 2021
The easiest way to animate your Next.js project. Scrollreveal.js helper package.

next-reveal The easiest way to animate your Next.js app Demo Introduction next-reveal makes it easy to add awesome scroll animations to your Next.js p

Zoltan Fodor 8 Nov 25, 2022
Alpine.js wrapper for @formkit/auto-animate.

?? Alpine AutoAnimate ?? An Alpine.js wrapper for @formkit/auto-animate. ?? Installation CDN Include the following <script> tag in the <head> of your

Marc Reichel 16 Dec 28, 2022
Simple scroll based text reveal animation library.

Simple scroll based text reveal animation library. ⛰️ DEMO Getting Started Using packge manager NPM Install textify using npm: npm install textify.js

Jeet 27 Dec 5, 2022
Javascript library for switching fixed elements on scroll through sections. Like Midnight.js, but without jQuery

Library for Switching Fixed Elements on Scroll Sometimes designers create complex logic and fix parts of the interface. Also they colour page sections

Vladimir Lysov 38 Sep 19, 2022
Lightweight and easy to use vanilla js library to add css animations to elements on scroll.

Scrollrisen Trigger css animations on scroll as elements enter the viewport. Zero dependencies, lightweight and easy to use and customize Installation

null 1 Oct 13, 2022
Conveyer adds Drag gestures to your Native Scroll.

Conveyer Demo / Documentation / Other components Conveyer adds Drag gestures to your Native Scroll. ?? ?? ?? ✨ Features You can use Native Scroll-like

NAVER 70 Dec 15, 2022
CSS3 list scroll effects

stroll.js – because it scrolls, and trolls. A collection of CSS list scroll effects. Works in browsers with support for CSS 3D transforms including a

Hakim El Hattab 4.3k Jan 3, 2023
A Simple jQuery Plugin for Animating Scroll

AnimateScroll A Simple jQuery Plugin for Animating the Scroll Demo can be seen at http://plugins.compzets.com/animatescroll What is it exactly? Animat

Ram 714 Jul 21, 2022
Reveal CSS animation as you scroll down a page

WOW.js Reveal CSS animation as you scroll down a page. By default, you can use it to trigger animate.css animations. But you can easily change the set

Matt Delac 9.7k Jan 8, 2023