Properties

The DotLottiePlayer component accepts the following props:

PropDescriptionTypeDefault

src (required)

Animation data or URL

Record<string, unknown> | string

undefined

lottieRef

Get player object

MutableRefObject

undefined

autoplay

Autoplay animation on load

boolean

false

background

Background color

string

transparent

direction

Play direction

1 | -1

1

hover

Whether to play on mouse hover

boolean

false

intermission

Pause between loops

number

0

loop

Whether to loop animation

boolean

false

playMode

Play mode

'normal' | 'bounce'

normal

renderer

How to render

'svg' | 'html' | 'canvas'

svg

speed

Play speed

number

1

onEvent

Listen to player events

function

undefined

activeAnimationId

Sets the initial animation to be played.

string

undefined

worker

Enables the lottie-worker script to play the animation using a web-worker.

boolean

false

Last updated