1.0.0 • Published 2 years ago

@nguyenshort/vue-lottie v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vue 3 Lottie Animation Player

Alt Text

Installation

npm i @nguyenshort/vue-lottie 

Initialization

Include in it either globally (in main.js) or a Vue component.

Global:

// main.ts, main.js
import Vue from "vue";
import VueLottie from '@nguyenshort/vue-lottie'

app.use(VueLottie)

Component:

import { VueLottiePlayer } from '@nguyenshort/vue-lottie'
export default {
    components: {
       VueLottiePlayer
    }
}

Usage

<script>
import { VueLottiePlayer } from '@nguyenshort/vue-lottie'
export default {
  name: "MyComponent",
  components: {
    VueLottiePlayer
  }
};
</script>

<template>
  <div>
    <vue-lottie-player
        width='250px'
        height='200px'
        loop
        path="https://assets8.lottiefiles.com/packages/lf20_7jnffdxl.json"
    />
  </div>
</template>
1.0.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago