nuxt3-aos3
TypeScript icon, indicating that this package has built-in type declarations

1.0.23 • Public • Published

nuxt3-aos3

npm version npm downloads License Nuxt

Basic Usage

1、Install

npm install --save-dev nuxt3-aos3

2、Configuration

✅Add nuxt3-aos3 to the modules section of nuxt.config.ts

export default defineNuxtConfig({
	// ...
	modules: ["nuxt3-aos3"],
	// ...
});

3、Basic Usage

Add v-aos to the element you want to animate

Add the animation class name you want to use

You can visit the official website of animate.css to select the animation class name you want to use

You can customize the execution time and delay time of the animation by adding the data-aos-delay and data-aos-duration properties

<div v-aos="['animate__fadeInUp']" data-aos-delay="0.5s" data-aos-duration="1s">An animated element</div>

The .once modifier allows element animation to be executed only once

<div v-aos.once="['animate__fadeInUp']" data-aos-delay="0.5s" data-aos-duration="1s">An animated element</div>

If you want to animate an element that is already in the viewport by default, you can add the animation class name without using a directive

*Don't forget the base class name animate__animated

<h1 class="animate__animated animate__bounce">An animated element</h1>

Package Sidebar

Install

npm i nuxt3-aos3

Weekly Downloads

1

Version

1.0.23

License

MIT

Unpacked Size

7.15 kB

Total Files

11

Last publish

Collaborators

  • rmaxbe