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 throughtransition: background-color 0.5s. See Animations. - CSS
@keyframes— adding thespinningclass starts an endlessrotateanimation. element.animate()—viewChild()finds the element, andanimate()plays a scale-and-fade pulse. The returnedLynxAnimationis canceled before each replay. See Animate from code andLynxAnimation.- Animations start from the tap handler —
animate()is called straight from it, and the class toggles set signals there too.
