Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
vue3-lottie
Advanced tools
[![npm](https://img.shields.io/npm/v/vue3-lottie)](https://www.npmjs.com/package/vue3-lottie) [![Downloads](https://img.shields.io/npm/dt/vue3-lottie)](https://www.npmjs.com/package/vue3-lottie) [![Stars](https://img.shields.io/github/stars/megasanjay/vue
After finding a suprising lack of Vue 3 components for Lottie animations, I decided to create my own.
View the live demos here: https://vue3-lottie.vercel.app
If you are using npm:
npm install vue3-lottie
If you are using yarn:
yarn add vue3-lottie
The most common use case is to register the component globally.
// main.js
import { createApp } from 'vue'
import Vue3Lottie from 'vue3-lottie'
createApp(App).use(Vue3Lottie).mount('#app')
Alternatively you can also import the component locally.
import Vue3Lottie from 'vue3-lottie'
export default {
components: {
Vue3Lottie,
},
}
You can then use the component in your template
<template>
<Vue3Lottie :animationData="DogJSON" :height="200" :width="200" />
</template>
<script>
import Vue3Lottie from 'vue3-lottie'
import DogJSON from './lotties/dog.json'
export default {
components: {
Vue3Lottie,
},
data() {
return {
DogJSON,
}
},
}
</script>
Prop | Type | Default Value | Description |
---|---|---|---|
animationData | Object (Required) | none | The lottie animation data |
autoPlay | Boolean | true | Start animation on component load |
rendererSettings | Object | {} | Options for if you want to use an existing canvas to draw (can be ignored on most cases) |
loop | Number or Boolean | true | The number of instances that the lottie animation should run (true is infinite) |
width | Number or String | "100%" | Width of the lottie animation container (Numbers correspond to pixel values) |
height | Number or String | "100%" | Height of the lottie animation container (Numbers correspond to pixel values) |
backgroundColor | String | transparent | Background color of the container |
pauseOnHover | Boolean | false | Whether to pause the animation on hover |
pauseOnClick | Boolean | false | Whether to play the animation when you hover |
pauseAnimation | Boolean | false | Prop to pass reactive variables so that you can control animation pause and play |
FAQs
Add Lottie animations to your Vue 3 or Nuxt 3 application.
The npm package vue3-lottie receives a total of 34,807 weekly downloads. As such, vue3-lottie popularity was classified as popular.
We found that vue3-lottie demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.