vue-animate-scroll

A small Vue component that provides an easy way to animate elements as they scroll into view.
2,576 47
Install
npm install vue-animate-scroll
Latest Version:0.1.5
License:MIT
Last Updated:Feb 18, 2025
Links: GitHub  ·  npm
Maintainer: mike-prince

vue-animate-scroll

A small Vue component that provides an easy way to animate elements as they scroll into view.

Setup

npm i --save vue-animate-scroll
# or
yarn add vue-animate-scroll

Import into your main Javascript file

import Vue from 'vue'
import VueAnimate from 'vue-animate-scroll'

Vue.use(VueAnimate)

Usage

HTML
<div v-animate="'slide-up'">Hello</div>

# NB. A string literal (inner single-quotes) should be passed.
CSS
.animate {
  transition-delay: .1s
  transition-duration: .25s
  transition-timing-function: ease-in
}

.slide-up {
  transform: translateY(0)
}

.slide-up.animate-active {
  transform: translateY(-100px)
}

Options

Vue.use(VueAnimate, { animateClass: String, activeClass: String });
const options = {
  animateClass: String,  /* Class that gets added to all directive
                            elements. Default 'animate'. */
  activeClass: String,   /* Class that gets added when elements scrolls
                            into view. Default 'animate-active' */
}

Modifiers

Modifier Description
repeat Repeats the animation every time it enters the window.
fade Adds a .fade class so opacity can be applied on the transition

For example to use both repeat and fade.

<div v-animate.repeat.fade="'slide-up'">Hello</div>

Related Packages

vue-json-tree-view

a JSON Tree View Component in Vue.js

380,792 473
@v-c/picker

picker ui component for vue

57,185 32
vue-frame-crm

vue components for crm system

15,005
kokk

A beautiful way to create a documentation from markdown, and insert a vue compon...

10,142 49
vue-desktop

A UI library for building admin panel website.

4,851 540

Version History

Version Released License
0.1.5 MIT
0.1.4 MIT
0.1.3 MIT
0.1.2 MIT
0.1.1 MIT