> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Animations

Three ways to animate on [Lynx](/guide/glossary.md#lynx): a CSS transition, a CSS `@keyframes` animation and the `element.animate()` API.


## What it shows

- **A CSS transition** — toggling `[class.transition-active]` animates the box's background color through `transition: background-color 0.5s`. See [Animations](/guide/animations/index.md).
- **CSS `@keyframes`** — adding the `spinning` class starts an endless `rotate` animation.
- **`element.animate()`** — `viewChild()` finds the element, and `animate()` plays a scale-and-fade pulse. The returned `LynxAnimation` is canceled before each replay. See [Animate from code](/guide/animations/programmatic.md) and [`LynxAnimation`](/api/angular-lynx/animation.md).
- **Animations start from the tap handler** — `animate()` is called straight from it, and the class toggles set signals there too.

## Related

- [Enter and Leave Transitions](/examples/transitions.md)
- [Gestures](/examples/gestures.md)
