| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
autoplay |
autoplay |
start animation automatically | boolean |
false |
dataJson |
-- | data JSON | {} |
{} |
loop |
loop |
loop animation | boolean |
false |
src |
src |
data JSON location | string |
'' |
| Event | Description | Type |
|---|---|---|
onAnimationLoaded |
triggered when the animation is loaded (event.detail.animation contains the Lottie animation item). | CustomEvent<void> |
getTotalFrames() => Promise<number>gets the number of frames
Type: Promise<number>
goToAndStop(value: number, isFrame?: boolean) => voidplays the animation until a certain frame, or time
| Name | Type | Description |
|---|---|---|
value |
number |
|
isFrame |
boolean |
Type: void
play() => voidplays the animation
Type: void
progress(progress: number) => voidsets the animation progress to a certain point (0..1)
| Name | Type | Description |
|---|---|---|
progress |
number |
Type: void
setDirection(direction: number) => voidsets the direction of the animation
| Name | Type | Description |
|---|---|---|
direction |
number |
Type: void
setSpeed(speed: number) => voidsets the speed of the animation
| Name | Type | Description |
|---|---|---|
speed |
number |
Type: void
stop() => voidstops the animation
Type: void
Built with StencilJS