New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vue-animated-list

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-animated-list

A Vue.js plugin for easily animating `v-for` rendered lists.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

vue-animated-list

A Vue.js plugin for easily animating v-for rendered lists.

Live Demo

Compatibility: IE10+.

Installation

  • With Modules

    // ES6
    import Vue from 'vue'
    import VueAnimatedList from 'vue-animated-list'
    Vue.use(VueAnimatedList)
    
    // ES5
    var Vue = require('vue')
    Vue.use(require('vue-animated-list'))
    
  • <script> Include

    Just include vue-animated-list.js after Vue itself.

Usage

There's nothing you need to do in JavaScript except for installation. In your markup, make sure the v-for has a transition attribute:

<div v-for="item in items" transition="item">
  {{ item.text }}
</div>

Now, all you need to do is define the .item-move CSS class:

.item-move {
  /* applied to the element when moving */
  transition: transform .5s cubic-bezier(.55,0,.1,1);
}

And that's it! You can also add CSS classes for enter and leave transitions - they all work nicely together!

A few things to note:

  • The animation is done using the CSS transform property. So make sure when .item-move is applied its transform property is transition-enabled.

  • Move animations can only work on elements, so it doesn't work for <template v-for> and fragment instance components.

Keywords

vue

FAQs

Package last updated on 18 Feb 2016

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