npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-transition

v0.1.3

Published

A transition component for Vue

Readme

Vue-transiton Component

A component to perform CSS transition using Vue.js.

It allows you to trigger a transition whenever you like.

Installation

npm install vue-transition

Or just include the file using a <script> tag.

Usage

HTML:

<div id="demo">
   <transition id="trans" options="all 0.5s ease" source="alert"></transition>
</div>

CSS:

.alert{
    background-color:red;
}

Javascript:

new Vue("#demo",{
    /*...your code here...*/
    methods{
        play:function(){
            this.transitions["trans"].play()
                                                .then(/*...your code here...*/);
        },
        rollback:function(){
            this.transitions["trans"].rollback()
                                                .then(/*...your code here...*/);
        }
    }
})

CommonJs

Vue.use(require('Vue-transiton'));
/*...your code here...*/

API reference

Transitions

  • transition.play(options->string)->Promise : This function will apply the transition by adding the source class you set .

options : the options string of transition, like"all 0.5s ease" . By default , the options used will be what you set on the transition component.

The function returns a Promise that will resolve on the html element event transitionend. If you don't like the Promise styled API, Just listen to the transitionend Vue event in the parent component.

  • transtion.rollback(options->string)->Promise: This function works just like transtion.play.

    The only difference is this one removes the source class you set to make a rollback effect.

Animations

  • animation.play->Promise: This function will apply the animation by adding the source animation class you set or continue a paused animation.

    The returned Promise will resolve on html event animationendor the same one named with -webkit. And it will dispatch a Vue event animationend(No -webkit here) together with its id.

  • aniamtion.pause->Promise: This function will pause the play animation by setting aniamtion-paly-state to "paused". So if you emit multiple animations on one element at the same time, the pausefunction will pause them all.

    The returned Promise will directly resolve.

  • aniamtion.restrat->Promise: This function will stop the current animation and then restart it.

    Also, you can use it to restart a animation that is specified to work only once.

    The returned Promise will resolve on animationend as aniamtion.play.

  • Events: CSS animations emit three event: animationstart,animationend,animationiteration. All these will be wrapped as Vue events with the same name.

    You can listen to them in any of the parent components, as they'll be dispatched upwards.

License

MIT