CSS keyframe animations and transitions run on a separate thread from JavaScript, making them immune to main thread blocking — unlike raw requestAnimationFrame loops or most JS animation libraries. Motion (formerly Framer Motion) is an exception because it uses the Web Animations API (WAAPI) under the hood, giving it the same off-main-thread benefits as CSS. GSAP runs on the main thread but offers more powerful features as a trade-off. The recommendation is to prefer native CSS animations, fall back to Motion when CSS falls short, and note that modern CSS APIs like View Transitions, linear(), and Animation Timeline reduce the need for JS libraries.
Table of contents
Table of ContentsLink to this heading Comparing CSS keyframes to JavaScript loopsLink to this heading Comparing animation librariesLink to this heading The right tool for the job217.4K Impressions6 Comments