Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dcasia/vue-aos

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dcasia/vue-aos

Implementing animation on scroll based on Vue 3

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
2
Weekly downloads
 
Created
Source

Vue AOS

Implementing animation on scroll based on Vue 3

How to use

  1. Install it from NPM
npm i @dcasia/vue-aos --save
  1. Import and register it in your Vue entry file
// main.ts

import { createApp } from 'vue'
import App from './App.vue'
import VueAOS from '@dcasia/vue-aos'
import '@dcasia/vue-aos/dist/vue-aos.css'

createApp(App)
    .use(VueAOS, {
        disable: false,
        isBrowser: true,
        anchorPlacement: 'center-bottom',
        once: true,
        duration: 1000,
        easing: 'ease-out',
        offset: 0,
        startEvent: 'init-aos',
        disableMutationObserver: false
    })
    .mount('#app')
  1. Feel free to use it in your Vue template
// app.vue

<AOS>
    <div>
        I'll be animated when you see me in the viewport
    </div>
</AOS>

Options

Global Options

NameTypeFunctionality
disableBooleanWhether to disable the effect globally
isBrowserBooleanWhether the current environment is a browser environment
anchorPlacement….
onceBooleanWhether only have elements fade in and without fading out
durationNumberAnimation duration
easingAnimation easing type
offsetNumberDistance from the trigger point, can be negative
startEventStringName of the event dispatched on the document, that AOS should initialize on
disableMutationObserverBooleanDisables automatic mutations' detections

Component Options

Options for single instance

NameTypeFunctionality
typeStringAnimation type
easingString
durationNumber | StringAnimation duration
offsetNumber | StringDistance from the trigger point, can be negative
delayNumber | StringAnimation delay
anchorStringThe name of the specified trigger anchor point
anchorPlacementThe position of the trigger point, taken from several key positions of the element and viewport
orderNumber | StringThe sequential animation order, it basically automatically calculate delay for current instance
stepNumber | StringThe Interval delay between different order
isGroupBooleanWhether to create a container element
tagStringThe tag name of the container
disableAnimationBooleanDisable animation on current instance but still can be triggered and emit key events
onceBooleanWhether only have elements fade in and without fading out
persistentAttributesBooleanWhether to retain aos custom attributes and class names after animation is done
hiddenOnServerBooleanWhether to hide itself on server side rendering to make it hidden at the very first beginning when it’s showing on client side

API

...

Keywords

FAQs

Package last updated on 17 Aug 2021

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc