> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/gum-elements/skia-standard-elements/lottieanimation.md).

# LottieAnimation

### Introduction

LottieAnimation instances can render animations in the [Lottie format](https://en.wikipedia.org/wiki/Lottie_\(file_format\)). Lottie files are animated files, usually with vector art, which serve as an alternative to gifs. Since they are often vector art, Lottie files can be resized without pixelation.

Lottie files can be downloaded from various sites or created in application such as Adobe After Effects. If you are interested in testing out Lottie animations, you may want to check [lottiefiles.com](https://lottiefiles.com/) for sample Lottie files.

The following shows a Lottie animation playing in Gum. Source file: <https://lottiefiles.com/free-animation/city-skyline-HFnJYQZLPP>

<figure><img src="/files/PvUdGirEAj2xhNcwmy03" alt=""><figcaption><p>LottieAnimation in Gum</p></figcaption></figure>

### Source File

The Source File variable controls the lottie animation displayed. This value can be set and changed just like source files on other elements such as a .png on a Sprite.

### Lottie Width and Height

Width and Height values can be set on a Lottie file just like any other Gum element. Unlike rasterized objects such as Sprites, LottieAnimations use Vector art so they can be resized and still retain crisp edges and details.

<figure><img src="/files/BIM1QKZptAZeECSA8wDZ" alt=""><figcaption><p>LottieAnimations can be resized and maintain their crisp visuals</p></figcaption></figure>

LottieAnimations are still rasterized in Gum, so they display pixels when the view is zoomed in, especially if the LottieAnimation has a small Width or Height.

<figure><img src="/files/VVfYECz3TmPlfMpaq7iM" alt=""><figcaption><p>LottieAnimations are still rasterized so zooming in shows pixels</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/skia-standard-elements/lottieanimation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
