For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /examples/animations.md.

Animations

Three ways to animate on 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.
  • 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 and LynxAnimation.
  • Animations start from the tap handler — animate() is called straight from it, and the class toggles set signals there too.