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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lottie-vuejs

v0.4.0

Published

A simple wrapper for integrating lottie-web into VueJs

Downloads

9,187

Readme

lottie-vuejs

npm version npm GitHub stars GitHub watchers


lottie-vuejs is currently in development! Use in production environment at your own risk

lottie-vuejs is a simple VueJS wrapper for lottie-web. It encompasses critical lottie-web functionality into an vue component plugin. Utilize lottie-vuejs to quickly and almost effortlessly bring lottie functionality into your VueJS project.

Why Lottie?

Lottie is a mobile library for Web, and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively!

Designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:

Flexible After Effects features

Lottie supports solids, shape layers, masks, alpha mattes, trim paths, and dash patterns.

Manipulate your animation any way you like

You can go forward, backward, and most importantly you can program your animation to respond to any interaction.

Small file sizes

Bundle vector animations within your app without having to worry about multiple dimensions or large file sizes. Alternatively, you can decouple animation files from your app’s code entirely by loading them from a JSON API.

Learn more › http://airbnb.design/lottie/

Looking for lottie files › https://www.lottiefiles.com/

Install

Add to lottie-vuejs to your project

npm install --save lottie-vuejs

Install lottie-vuejs globally

# Install globally (recommended)
npm install -g lottie-vuejs

Add to global scope

import Vue from 'vue'
import LottieAnimation from "lottie-vuejs/src/LottieAnimation.vue"; // import lottie-vuejs

Vue.use(LottieAnimation); // add lottie-animation to your global scope

new Vue({
  render: h => h(App)
}).$mount('#app')

OR

<script>
import LottieAnimation from "lottie-vuejs/src/LottieAnimation.vue"; // import lottie-vuejs

export default {
  components: {
      LottieAnimation
  },
  data: () => ({
    ...
  })
};
</script>

Usage

Basic

<lottie-animation
    path="path/to/your/lottie-animation.json"
/>

Advanced

<lottie-animation
    path="path/to/your/lottie-animation.json"
    :loop="false"
    :autoPlay="true"
    :loopDelayMin="2.5"
    :loopDelayMax="5"
    :speed="1"
    :width="256"
    :height="256"
    @AnimControl="setAnimController"
/>

Configuration

  • path:
    The relative path to the animation object (starts in your public folder) e.g. animations/my-cool-animation.json or an absolute path e.g. http://www.mysite.com/animations/my-cool-animation.json.
  • speed:
    type: Number required: false default: 1
  • width:
    type: Number required: false default: -1 //defaults to 100%, Number is in pixels
  • height:
    type: Number required: false default: -1 //defaults to 100%, Number is in pixels
  • loop:
    type:Boolean required: false default: true
  • autoPlay:
    type:Boolean required: false default: true
  • loopDelayMin:
    type: Number required: false default: 0
  • loopDelayMax:
    type: Number required: false default: 0
  • @AnimControl:
    type: Event required: false Returns the lottie-web animation controller for custom event hookup & direct access to the lottie instance. Read the lottie-web usage section for more info

build

Running the build script results in 3 compiled files in the dist directory, one for each of the main, module, and unpkg properties listed in your package.json file. With these files generated, you're ready to go!