All Projects → chenqingspring → Vue Lottie

chenqingspring / Vue Lottie

Licence: mit
Render After Effects animations on Vue based on Bodymovin

Projects that are alternatives of or similar to Vue Lottie

Vue Flip
A Vue.js component to flip elements.
Stars: ✭ 37 (-96.43%)
Mutual labels:  vue-components, vuejs2
Vuelayers
Web map Vue components with the power of OpenLayers
Stars: ✭ 532 (-48.7%)
Mutual labels:  vue-components, vuejs2
Vue Touch Ripple
👆 Touch ripple component for @vuejs
Stars: ✭ 443 (-57.28%)
Mutual labels:  vue-components, vuejs2
Vue Material Dashboard
Vue Material Dashboard - Open Source Material Design Admin
Stars: ✭ 403 (-61.14%)
Mutual labels:  vue-components, vuejs2
Vue Quill Editor
🍡@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+562.87%)
Mutual labels:  vue-components, vuejs2
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (-58.15%)
Mutual labels:  vue-components, vuejs2
Vue Stripe Elements
A Vue 2 component collection for StripeElements
Stars: ✭ 498 (-51.98%)
Mutual labels:  vue-components, vuejs2
Vue Page Transition
A lightweight Vue.js plugin for page / route transitions.
Stars: ✭ 311 (-70.01%)
Mutual labels:  vue-components, vuejs2
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (-27.19%)
Mutual labels:  vue-components, vuejs2
Vue Burger Menu
🍔 An off-canvas sidebar Vue component - https://vue-burger-menu.netlify.com/
Stars: ✭ 648 (-37.51%)
Mutual labels:  vue-components, vuejs2
Vue Video Player
🎞 @videojs component for @vuejs
Stars: ✭ 4,026 (+288.24%)
Mutual labels:  vue-components, vuejs2
Semantic Ui Vue
Semantic UI integration for Vue
Stars: ✭ 914 (-11.86%)
Mutual labels:  vue-components, vuejs2
Vue Goodshare
🍿 Vue.js component for social share. A simple way to share a link on the pages of your website in the most popular (and not so) social networks. Powered by goodshare.js project.
Stars: ✭ 345 (-66.73%)
Mutual labels:  vue-components, vuejs2
Vue Flexboxgrid
Vue components made with Flexboxgrid
Stars: ✭ 37 (-96.43%)
Mutual labels:  vue-components, vuejs2
Quasar
Quasar Framework - Build high-performance VueJS user interfaces in record time
Stars: ✭ 20,090 (+1837.32%)
Mutual labels:  vue-components, vuejs2
Vue Swatches
🎨 Help the user picking beautiful colors!
Stars: ✭ 456 (-56.03%)
Mutual labels:  vue-components, vuejs2
Vue Cnodejs
基于vue.js重写Cnodejs.org社区的webapp
Stars: ✭ 3,065 (+195.56%)
Mutual labels:  vue-components, vuejs2
Vue Project
基于vue-cli构建的财务后台管理系统(vue2+vuex+axios+vue-router+element-ui+echarts+websocket+vue-i18n)
Stars: ✭ 301 (-70.97%)
Mutual labels:  vue-components, vuejs2
Vuesax
New Framework Components for Vue.js 2
Stars: ✭ 5,293 (+410.41%)
Mutual labels:  vue-components, vuejs2
Vue Meteor
🌠 Vue first-class integration in Meteor
Stars: ✭ 893 (-13.89%)
Mutual labels:  vue-components, vuejs2

Lottie Animation View for Vue (React, Angular)

npm version

Generated by create-vue-component

Wapper of bodymovin.js

bodymovin is Adobe After Effects plugin for exporting animations as JSON, also it provide bodymovin.js for vender them as svg/canvas/html.

Demo

https://chenqingspring.github.io/vue-lottie

Why Lottie?

Flexible After Effects features

We currently support solids, shape layers, masks, alpha mattes, trim paths, and dash patterns. And we’ll be adding new features on a regular basis.

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 morehttp://airbnb.design/lottie/

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

Installation

Install through npm:

npm install --save vue-lottie

Usage

<template>
    <div id="app">
        <lottie :options="defaultOptions" :height="400" :width="400" v-on:animCreated="handleAnimation"/>
        <div>
            <p>Speed: x{{animationSpeed}}</p>
            <input type="range" value="1" min="0" max="3" step="0.5"
                   v-on:change="onSpeedChange" v-model="animationSpeed">
        </div>
        <button v-on:click="stop">stop</button>
        <button v-on:click="pause">pause</button>
        <button v-on:click="play">play</button>
    </div>
</template>

<script>
  import Lottie from './lottie.vue';
  import * as animationData from './assets/pinjump.json';

  export default {
    name: 'app',
    components: {
      'lottie': Lottie
    },
    data() {
      return {
        defaultOptions: {animationData: animationData},
        animationSpeed: 1
      }
    },
    methods: {
      handleAnimation: function (anim) {
        this.anim = anim;
      },

      stop: function () {
        this.anim.stop();
      },

      play: function () {
        this.anim.play();
      },

      pause: function () {
        this.anim.pause();
      },

      onSpeedChange: function () {
        this.anim.setSpeed(this.animationSpeed);
      }
    }
  }
</script>

Configuration

You can pass a configuration object through options property:

  • animationData: an Object with the exported animation data.
  • path: the relative path to the animation object. (animationData and path are mutually exclusive)
  • loop: true / false / number
  • autoplay: true / false it will start playing as soon as it is ready
  • name: animation name for future reference
  • renderer: 'svg' / 'canvas' / 'html' to set the renderer
  • container: the dom element on which to render the animation

More information on Bodymoving Documentation

Related Projects

Contribution

Your contributions and suggestions are heartily welcome.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].