Attributes

The dotlottie-wc component accepts all configuration attributes of DotLottie from @lottiefiles/dotlottie-web, allowing you to customize your animation as required.

AttributeTypeDescription
srcstringURL of the Lottie or DotLottie animation.
autoplaybooleanAutomatically start the animation.
loopbooleanLoop the animation.
speednumberPlayback speed.
datastringAnimation data as a string or ArrayBuffer for .lottie animations.
segmentArrayAnimation segment as an array of two numbers (start frame and end frame).
modestringAnimation play mode (e.g., “forward”, “bounce”).
backgroundColorstringBackground color of the canvas. Accepts 6-digit or 8-digit hex color string (e.g., “#000000FF”).
renderConfigObject (RenderConfig)Configuration for rendering the animation.
useFrameInterpolationbooleanDetermines if the animation should update on subframes.
markerstringThe Lottie named marker to play.
animationIdstringThe ID of the animation to play.
themeIdstringThe ID of the theme to apply.
stateMachineIdstringThe ID of the state machine to load.
stateMachineConfigObject (StateMachineConfig)Configuration for state machine behavior.

RenderConfig

The renderConfig object accepts the following properties:

Property nameTypeDefaultDescription
devicePixelRationumberwindow.devicePixelRatio | 1The device pixel ratio.

StateMachineConfig

The stateMachineConfig object accepts the following properties:

Property nameTypeDescription
openUrlPolicyobjectURL opening policy configuration
openUrlPolicy.requireUserInteractionbooleanRequire user interaction before opening URLs
openUrlPolicy.whiteliststring[]Allowed URL patterns