Properties

Lists the properties of the Lottie-React player
Prop
Description
Type
Default
lottieRef
Get the lottie animation object.
function
undefined
onEvent
Listen for events.
function
undefined
onStateChange
Play state changes.
function
undefined
onBackgroundChange
Listen for background changes.
function
undefined
autoplay
Autoplay animation on load.
boolean
false
background
Background color.
string
undefined
controls
Show player controls.
boolean
false
direction
Direction of animation. Set to 1 to play the animation forward, or set to -1 to play it backwards.
number
1
hover
Whether to play on mouse hover.
boolean
false
keepLastFrame
Stop animation on the last frame. Has no effect if loop is true.
boolean
false
loop
Whether to loop animation.
boolean
false
renderer
Renderer to use. Possible values: svg, html and canvas
string
svg
speed
Animation speed. You can set this to any value > 0.
number
1
style
The style for the container.
object
undefined
src (required)
Bodymovin JSON data or URL to JSON file.
object
string
Last modified 5mo ago