<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>
AOS.init({
duration: 1200,
});
</script>
npm i aos — save //installation
//import
import AOS from "aos";
import "aos/dist/aos.css";
//useEffect
useEffect(() => {
AOS.init();
AOS.refresh();
}, []);
//example
data-aos="fade-up"
/*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>
// In your terminal
yarn add aos@next or npm install --save aos@next
// In your JS file
import AOS from 'aos';
import 'aos/dist/aos.css';
AOS.init();
// then, you can add data-aos attributes in your html
<div data-aos="flip-left"></div>
<div data-aos="zoom-in-right"></div>
<div data-aos="zoom-in-left"></div>