DEV Community

Cover image for KeyframeKit: Run CSS Keyframes via Web Animations API
jQueryScript
jQueryScript

Posted on

KeyframeKit: Run CSS Keyframes via Web Animations API

KeyframeKit: a JavaScript library that reads your CSS @keyframes rules and converts them into native Web Animations API objects you control fully in JS.

Key features:

  • Reads keyframes from document stylesheets or a fetched CSS file
  • Returns a native Animation instance — .play(), .pause(), .playbackRate, .finished
  • Reverse playback with playbackRate = -1
  • Progress tracking via overallProgress (0 to 1)
  • KeyframeEffectParameters class for clean JS-only animation authoring
  • Custom timeline support for scroll-driven animations
  • Zero dependencies, typed errors, ES module ready

👉 Blog Post

👉 GitHub Repo

👉 Live Demo

Top comments (0)