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) => void
plays the animation until a certain frame, or time
Name | Type | Description |
---|---|---|
value |
number |
|
isFrame |
boolean |
Type: void
play() => void
plays the animation
Type: void
progress(progress: number) => void
sets the animation progress to a certain point (0..1)
Name | Type | Description |
---|---|---|
progress |
number |
Type: void
setDirection(direction: number) => void
sets the direction of the animation
Name | Type | Description |
---|---|---|
direction |
number |
Type: void
setSpeed(speed: number) => void
sets the speed of the animation
Name | Type | Description |
---|---|---|
speed |
number |
Type: void
stop() => void
stops the animation
Type: void
Built with StencilJS