Comment on page

Properties

Lists the Lottie-Player properties for playing animations.
Property
Description
Type
Default Value
autoplay
When set to true, automatically plays the animation on loading it.
boolean
false
background
Background color. By default, the background is transparent and will take the color of the parent container.
string
Not defined
controls
When set to true, displays player controls
boolean
false
count
Number of times to loop the animation
number
Not defined
direction
Direction of the animation. Set to 1 to play the animation forward or set to -1 to play it backward.
number - Either 1 or -1
1
hover
When set to true, plays animation on mouse over
boolean
false
loop
When set to true, loops the animation. The count property defines the number of times to loop the animation. Setting the count property to 0 and setting loop to true, loops the animation indefinitely.
boolean
false
mode
Play mode. Setting the mode to PlayMode.Bounce plays the animation in an indefinite cycle, forwards and then backwards.
Either PlayMode.Bounce or PlayMode.Normal
PlayMode.Normal
preserveAspectRatio
Valid value to preserve the aspect ratio. See the Mozilla documentation for more information.
string
xMidYMid meet
renderer
The renderer to use for the animation
string - Either 'svg', 'html' or 'canvas'
svg
speed
Animation speed. Set this parameter to any positive number.
number
1
src
The animation to play, either Bodymovin JSON data or a URL to a JSON file. This parameter is mandatory.
string
undefined
intermission
Duration (in milliseconds) to pause before playing each cycle in a looped animation. Set this parameter to 0 (no pause) or any positive number.
number
1
disableCheck
Disables verification of the Lottie animation before loading it.
boolean
false
Last modified 1yr ago