Coder Social home page Coder Social logo

nuxt3-aos's Introduction

nuxt3-aos

npm version npm downloads License Nuxt

Basic Usage

1、Install

npm install --save-dev nuxt3-aos

2、Configuration

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

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

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.