Skip to main content

Animation

Animation component uses Lottie files to show Animations.

Props

AttributeDescriptionType
srcSets the source url or path of the animation[String, Object]
loopSpecifies whetever the animation should loop indefinitely.Boolean
autoplaySpecifies whetever the animation should playing automatically.Boolean.
speedNumber Specifies the speed of the animation. (1,2,3,4)Number
directionSpecifies direction of the animation (right,left)String

Methods

AttributeDescriptionExample Code
playStarts playing the animationcomponents.EdtrComp_28.play()
stopStops the animation completely.(unlike pause() the animation cannot resume where it left off; it starts over when play() is called again)components.EdtrComp_28.stop()
pausePauses the animation at the current framecomponents.EdtrComp_28.pause()

Events

AttributeDescription
onMessageTriggered when message is sent inside the frame
playTriggered when animation starts playing
stopTriggered when animation stops playing
pauseTriggered when animation is paused

Example Usage

Src

Users can upload their own lottie json file to Plateau Studio and directly use it via Animation Component src prop.

image

image

Speed

Changes the speed of the Animation component

image

Direction

Changes the direction of the Animation component

image

Sample Qjson

AnimationExample

Sample Lottie

Example Lottie