Socket
Socket
Sign inDemoInstall

aos

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aos

Animate on scroll library


Version published
Maintainers
1
Created

What is aos?

AOS (Animate On Scroll) is a small library that allows you to animate elements as you scroll down, and up. It is highly customizable and easy to use, making it a popular choice for adding scroll animations to web projects.

What are aos's main functionalities?

Basic Animation

This feature allows you to add basic animations to elements as they come into view while scrolling. The 'data-aos' attribute specifies the type of animation.

<script>
  AOS.init();
</script>
<div data-aos="fade-up">
  <p>This element will fade up as you scroll down.</p>
</div>

Custom Animation Duration

You can customize the duration of the animation using the 'data-aos-duration' attribute. This example sets the animation duration to 2000 milliseconds (2 seconds).

<div data-aos="fade-up" data-aos-duration="2000">
  <p>This element will fade up over 2 seconds as you scroll down.</p>
</div>

Custom Animation Delay

You can add a delay to the start of the animation using the 'data-aos-delay' attribute. This example sets a delay of 500 milliseconds.

<div data-aos="fade-up" data-aos-delay="500">
  <p>This element will start fading up 500 milliseconds after it comes into view.</p>
</div>

Easing Function

You can specify an easing function for the animation using the 'data-aos-easing' attribute. This example uses the 'ease-in-out' easing function.

<div data-aos="fade-up" data-aos-easing="ease-in-out">
  <p>This element will fade up with an ease-in-out easing function.</p>
</div>

Anchor Placement

You can control when the animation should start based on the position of the element in the viewport using the 'data-aos-anchor-placement' attribute. This example starts the animation when the top of the element is at the center of the viewport.

<div data-aos="fade-up" data-aos-anchor-placement="top-center">
  <p>This element will fade up when the top of the element is at the center of the viewport.</p>
</div>

Other packages similar to aos

FAQs

Package last updated on 03 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc