Props Reference

Complete reference for the DotLottieVue component props, with types, defaults, exposed methods, and event access.

The DotLottieVue component accepts the following props.

Props

PropTypeRequiredDefaultDescription
srcstring✔️undefinedSource URL or path to the .lottie or .json file
datastring | ArrayBufferundefinedAnimation data as a Lottie JSON string or an ArrayBuffer for .lottie animations
autoplaybooleanfalseAuto-starts the animation on load
loopbooleanfalseDetermines if the animation should loop
loopCountnumber0Number of times the animation loops before stopping. 0 loops infinitely when loop is true
speednumber1Animation playback speed. 1 is regular speed
mode"forward" | "reverse" | "bounce" | "reverse-bounce""forward"Animation play mode
segment[number, number][0, totalFrames - 1]Animation segment. Accepts an array of two numbers: start frame and end frame
markerstringundefinedNamed Lottie marker to play
animationIdstringundefinedID of the animation to load from a multi-animation .lottie file
themeIdstringundefinedThe ID of the dotLottie theme to initially use
themeDatastringundefinedRaw theme JSON string to apply directly, as an alternative to themeId
backgroundColorstringundefinedBackground color of the animation container. Accepts 6-digit or 8-digit hex color string (e.g., "#000000", "#000000FF")
layoutLayoutundefinedLayout configuration with fit and align properties (see Layout Configuration)
renderConfigRenderConfig{}Configuration for rendering the animation (see Render Configuration)
useFrameInterpolationbooleantrueDetermines if the animation should update on subframes. When false, the original AE frame rate is maintained, potentially improving performance
stateMachineIdstringundefinedID of the state machine to load on animation load
stateMachineConfigStateMachineConfigundefinedSecurity configuration for the state machine, such as the URL open policy (see StateMachineConfig)
playOnHoverbooleanfalsePlays the animation when the cursor hovers over it, and pauses when it leaves

Example:

<DotLottieVue
  src="https://example.com/animation.lottie"
  :autoplay="true"
  :loop="true"
  :speed="2"
  :segment="[10, 20]"
  :backgroundColor="'#f0f0f0'"
/>

Exposed Methods

The component instance, obtained through a template ref, exposes the following method:

MethodDescription
getDotLottieInstance()Returns the underlying DotLottie player instance, which exposes the full core player API
<template>
  <DotLottieVue ref="playerRef" src="animation.lottie" loop autoplay />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { DotLottieVue } from "@lottiefiles/dotlottie-vue";

const playerRef = ref<InstanceType<typeof DotLottieVue> | null>(null);

const dotLottie = () => playerRef.value?.getDotLottieInstance();
</script>

Events

Player events (load, play, pause, complete, loadError, and others) are surfaced through the underlying DotLottie instance's addEventListener() method, not as Vue component events. The complete list of events and their payloads is in the core player Events reference. For a working listener pattern, see Handle Events and Errors.

Last updated: August 13, 2026 at 9:17 AMEdit this page