EasyFrame

- Build sprite sheet animation | originally from AnimeCursor

EasyFrame.JS

CSS Sprite Sheet Animation Generator

Zero-coding, lightweight library that automatically injects keyframe animations from simple HTML data attributes.

What is EasyFrame?

EasyFrame is a JavaScript library that eliminates the tedious work of writing CSS @keyframes for sprite sheet animations. Just add a few data- attributes to your HTML, and the library dynamically generates and injects the required CSS — no manual calculations, no extra build steps.

Key Features

Zero Configuration

Add class="ef-sprite", data-ef and data-ef-src attribute – animation runs automatically.

📦

Lightweight

~3KB minified, no dependencies. Works in all modern browsers.

🎞️

Compound Animations

Use arrays for frames and duration to create multi‑segment sequences with different speeds.

🖼️

Pixel Art Support

Add pixel flag to enable image-rendering: pixelated for crisp edges.

🔄

Flexible Loops

Choose from loop, pingpong (infinite alternate), or none (play once).

🌐

Online Preview

Use our online tool to preview animation, and adjust your configurations.

All processing happens locally – your images never leave your browser.

Quick Start

Include the library via CDN and add a sprite element:

<!-- Include EasyFrame -->
<script src="https://cdn.jsdelivr.net/gh/ShuninYu/easy-frame@v1.0.0/dist/easy-frame.umd.min.js"></script>

<!-- Your sprite element -->
<div class="ef-sprite"
     data-ef="size:64x64;frames:6;duration:1;mode:loop"
     data-ef-src="/images/character.png">
</div>

That's it! The animation will be injected automatically when the page loads.

For more control, explore the online tool or read the tutorial.

See It in Action

The dancing character at the top of this page is powered by EasyFrame – just one <div> with data-ef attributes. No custom CSS was written.