Skip to main content
Engineering5 min readNovember 2026

What is the Web Animations API?

Short answer

The Web Animations API (WAAPI) is a browser JavaScript API for animating elements with element.animate(keyframes, options). It runs on the same engine as CSS animations, so it is fast, but gives you control from code: play, pause, reverse, seek, change speed and wait for finished. It is supported in all modern browsers and needs no library.

Core Takeaway

  • element.animate(keyframes, options) returns an Animation object
  • Control: play(), pause(), reverse(), currentTime, playbackRate
  • animation.finished is a Promise you can await
  • Uses the browser animation engine; transform and opacity can run off the main thread
  • Libraries such as Motion build on it

A first example

const anim = document.querySelector('.card').animate(
  [
    { transform: 'translateY(12px)', opacity: 0 },
    { transform: 'translateY(0)', opacity: 1 }
  ],
  { duration: 300, easing: 'cubic-bezier(0.2, 0, 0, 1)', fill: 'both' }
);

await anim.finished;

Why use it instead of CSS

CSS animations are declarative and great for fixed effects. WAAPI is better when values come from JavaScript, when you need to pause, reverse or scrub, or when you need to know exactly when an animation ends. Because it uses the same engine, performance is similar to CSS.

Limits

WAAPI does not do spring physics on its own; you approximate springs with linear() easing or use a library. It animates one element at a time, so choreography and gestures need more code. For many developers, a library such as Motion sits on top of WAAPI and adds those features.

Where runtime tools fit

When a designer builds a multi-state animation, rebuilding it with WAAPI by hand is slow. Runtime tools such as Lottie, Rive and ExodeUI play designed files instead. We make ExodeUI.

Frequently asked questions

Is the Web Animations API supported everywhere?

The core element.animate() API works in all current major browsers.

Is WAAPI faster than requestAnimationFrame?

For transform and opacity, usually yes, because the browser can run it off the main thread.

Can I use WAAPI in React?

Yes. Call element.animate on a ref inside an effect or event handler.

Does WAAPI support scroll-driven animation?

Yes, with ScrollTimeline and ViewTimeline in browsers that support scroll-driven animations.

Related Guides & Examples

Skip hand-coding multi-state motion

Design states visually in ExodeUI and drive them from your code.

Read the docs
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →