Command Palette

Search for a command to run...

Props Reference

Complete reference for all props available on the DotLottieReact component, including render configuration, layout, and state machine options.

dotLottie React Player Props Reference

The DotLottieReact component extends the HTMLCanvasElement Props and accepts all the props that the HTMLCanvasElement accepts. In addition, it accepts the following props:

Component Props

PropertyTypeDefaultDescription
autoplaybooleanfalseAuto-starts the animation on load.
loopbooleanfalseDetermines if the animation should loop.
srcstringundefinedURL to the animation data (.json or .lottie).
speednumber1Animation playback speed. 1 is regular speed.
datastring | ArrayBufferundefinedAnimation data provided either as a Lottie JSON string or as an ArrayBuffer for .lottie animations.
modestring"forward"Animation play mode. Accepts "forward", "reverse", "bounce", "reverse-bounce".
backgroundColorstringundefinedBackground color of the canvas. Accepts 6-digit or 8-digit hex color string (e.g., "#000000", "#000000FF").
segment[number, number][0, totalFrames - 1]Animation segment. Accepts an array of two numbers, where the first number is the start frame and the second number is the end frame.
renderConfigRenderConfig{}Configuration for rendering the animation.
playOnHoverbooleanfalseDetermines if the animation should play on mouse hover and pause on mouse out.
dotLottieRefCallbackReact.RefCallback<DotLottie | null>undefinedCallback function that receives a reference to the dotLottie web player instance.
useFrameInterpolationbooleantrueDetermines if the animation should update on subframes. If set to false, the original AE frame rate will be maintained. If set to true, it will refresh at each requestAnimationFrame, including intermediate values.
markerstringundefinedThe Lottie named marker to play.
animationIdstringundefinedThe ID of the animation to play from a multi-animation .lottie file.
themeIdstringundefinedThe ID of the theme to apply.
themeDatastringundefinedTheme data to apply as a string.
layoutLayoutundefinedLayout configuration for fitting the animation.
stateMachineIdstringundefinedThe ID of the state machine to load.
stateMachineConfigStateMachineConfigundefinedConfiguration for state machine behavior.
loopCountnumber0Number of loops to play (0 for infinite).

RenderConfig

The renderConfig object accepts the following properties:

PropertyTypeDefaultDescription
devicePixelRationumberwindow.devicePixelRatio | 1The device pixel ratio.
autoResizebooleantrueDetermines if the canvas should resize automatically to its container.

Layout

The layout object accepts the following properties:

PropertyTypeDefaultDescription
fit'contain' | 'cover' | 'fill' | 'none' | 'fit-width' | 'fit-height''contain'How to fit the animation in the canvas.
align[number, number][0.5, 0.5]Alignment within canvas [x, y] from 0 to 1.

StateMachineConfig

The stateMachineConfig object accepts the following properties:

PropertyTypeDescription
openUrlPolicyobjectURL opening policy configuration.
openUrlPolicy.requireUserInteractionbooleanRequire user interaction before opening URLs.
openUrlPolicy.whiteliststring[]Allowed URL patterns.
Last updated: April 10, 2026 at 9:12 AMEdit this page