Vue3 Lottie

screenshot of Vue3 Lottie

A simple Vue 3 component for using Lottie animations in Vue 3

Overview

Vue3 Lottie is a tool created for Vue 3 or Nuxt 3 applications that allows developers to easily integrate Lottie animations. It serves as a Vue wrapper around the lottie-web library, offering additional features to enhance the animation experience within Vue applications.

Features

  • Easy Integration: Seamlessly add Lottie animations to Vue 3 or Nuxt 3 applications.
  • Compatibility with Lottie-Web Library: Utilizes the lottie-web library for animation functionalities.
  • Global Component Registration: Register the component globally for convenient usage in the application.
  • TypeScript Support: Upgrading to version 3.x provides better support for TypeScript.
  • Detailed Documentation: Comprehensive documentation available for guidance on installation and usage.
  • Props and Options: Includes props like animationData and animationLink for customization options.

Vue 3

If you are using npm:

npm install vue3-lottie

If you are using yarn:

yarn add vue3-lottie

Register the component globally in your Vue 3 application. Alternatively, you can import the component locally and use it in your template.

Nuxt 3 (Experimental)

If you are using npm:

npm install vue3-lottie

If you are using yarn:

yarn add vue3-lottie

For Nuxt 3, create a file named Vue3Lottie.client.ts in a plugins directory at the root of your project. Add the necessary code to register the component globally for usage in your Nuxt 3 application.

Summary

Vue3 Lottie provides a user-friendly solution for incorporating Lottie animations into Vue 3 and Nuxt 3 applications. With its compatibility with the lottie-web library, straightforward installation process, and detailed documentation, developers can enhance their projects with engaging animations seamlessly.