🎬
One component, full control
Pass your Lottie JSON as a prop and control playback with play(), pause(), stop(), goToAndPlay() and more via a template ref.
Play Airbnb Lottie-web animations exported from After Effects with a single Vue component. TypeScript-ready, SSR-safe, 21 kB.
<script setup lang="ts">
import { LottieAnimation } from "lottie-web-vue"
import WatermelonJSON from "./assets/watermelon.json"
</script>
<template>
<LottieAnimation :animation-data="WatermelonJSON" :auto-play="true" :loop="true" />
</template>Install it:
npm install lottie-web-vueyarn add lottie-web-vuepnpm add lottie-web-vue