Menu

1 / 3

AOS hasn't had a release since 2018, so I built a modern replacement

DEV Community: typescript·Muhammad Hassan Siddiqui·4 days ago
#rfii3jVU
#devtotypescript#devto#dev#scroll#reveal
Reading 0:00
15s threshold

AOS (Animate On Scroll) is still downloaded about 174,000 times a week. Its last release, 2.3.4, came out in October 2018, and 3.0 never left beta. I wanted a maintained, typed version with the same animations and options, so I built reveal-on-scroll .

Quick start

npm install reveal-on-scroll

Enter fullscreen mode

Exit fullscreen mode

import ROS from ' reveal-on-scroll ' ; import ' reveal-on-scroll/style.css ' ;

ROS . init ();

Enter fullscreen mode

Exit fullscreen mode

<div data-ros= "fade-up" > I fade in when you scroll to me. </div>

Enter fullscreen mode

Exit fullscreen mode

No bundler? Use the CDN:

<link rel= "stylesheet" href= "https://unpkg.com/reveal-on-scroll/dist/reveal-on-scroll.css" /> <script src= "https://unpkg.com/reveal-on-scroll/dist/reveal-on-scroll.js" ></script> <script> ROS .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.