- Enhanced GSAP Letter Animation Guide
- Added detailed usage instructions for the ca__gx-lt attribute supporting sequence, reverse, and random values.
- Includes updated examples, automatic span-wrapping explanation, and simplified ca-gsap usage syntax.
- index.js now loads full cssanimation.io stack (CSS + letter animations + GSAP) in one import
- Removed direct UMD imports from ESM entry to prevent bundler issues
- Improved DX: using
import 'cssanimationio'now auto-initializes animations - Enhanced debug tooling with optional
window.__CA_DEBUGflag
removeLetterAnimationHints()utility ingsap-letteranimation.jsto clean up GPU-related styles after animations complete.
- Updated
animateFadeInandanimateFadeInLeft:- Automatically remove
will-change,backface-visibility, andtransform-styleinline styles after animations. - Preserves any user-provided
onCompletecallbacks. - Improves memory efficiency for long-running or high-volume animation use.
- Automatically remove
- Applies to both block and letter-based animations (
ca__gx-lt). - No developer setup required — cleanup is built-in and automatic.
- Automatic prefixing of GSAP animation map keys using
ca__gx-ingen-animation-map.mjs
- Internal map generation now uses consistent naming with cssanimation.io
- All animation names can now be referenced uniformly across utility, GSAP, and data-attribute APIs
-
Modular export system for animations
A new Node.js script automatically extracts animation blocks from./dist/cssanimation.cssand creates:- Individual module files using PascalCase naming (e.g.,
ca__LetterFadeIn.css) - Metadata headers in each file with module info and usage examples
- Individual module files using PascalCase naming (e.g.,
-
ca__index.cssauto-generated a central file that imports all animation modules.
./dist/modules/
├── ca__LetterFadeIn.css
├── ca__BounceUp.css
├── ca__ZoomSlideLeft.css
├── ca__index.cssca__lt-delay attribute support
Developers can now control the delay between animated letters directly from HTML markup:
- Example:
<div class="ca__lt-sequence" ca__lt-delay="200">Hello</div> - No JS changes required
- Code updated to check for this attribute while preserving default delay behavior
- Fully backward compatible
- PascalCase Class Prefixing:
- All class names now auto-convert to PascalCase format.
- Helps maintain consistency, improves readability, and avoids naming collisions.
| File | Prefix | Example Before | Example After |
|---|---|---|---|
cssanimation.css |
ca__fx- |
.bounce-in |
.ca__fx-BounceIn |
cssanimation-utility.css |
ca__u- |
.grid-helper |
.ca__u-GridHelper |
Classes starting with le |
ca__lt- |
.le-shake-text |
.ca__lt-ShakeText |
These global classes are excluded from prefixing:
.cssanimation.cssanimation span.infinite
- Class name logic lives in
postcss/prefixer.js - Ensure to run
npm run prefix:css:allbefore build to apply changes - Follow consistent class naming in raw
.cssfiles to avoid malformed output
- GSAP Animation Engine: Introduced a new modular engine (
cssanimation-gsap.js) that enables GSAP-powered animations using HTML attributes.- Usage via
data-gsap="bounce"anddata-gsap-options='{ "y": 30, "duration": 1.5 }' - Supports all GSAP animation properties like
x,y,opacity,scale,ease,repeat, etc. - Compatible with Vite, Webpack, and plain HTML via UMD build.
- Usage via
- Generated Animation Map: Auto-generated
generated-animation-map.jsmapsdata-gsapnames to animation functions for scalable modularity. - Error Handling: Robust JSON validation for
data-gsap-optionswith helpful console messages to aid developers. - New NPM Build Targets:
dist/ca__gsap/cssanimation-gsap.umd.js– UMD-compatible build for browser usesrc/animations/– Modular animation definitions
- Developer Tools:
- Auto-copying of
animationsandca__gsapfolders in build - Added
generate:mapscript to manage animation mapping - Improved
package.jsonscripts and dev dependencies
- Auto-copying of
- Restructured
src/animations/to follow one-module-per-animation best practice. - Added
gsapas apeerDependencyto avoid forced version locks. - Updated README with GSAP usage examples for:
- NPM + Vite/ESM setup
- Plain HTML via
<script>+ CDN
- GSAP is now a required peer dependency. Developers must install GSAP themselves:
bash npm install cssanimationio gsap
- Support for
.ca__le*letter animation classes in the class extraction tool - A new dedicated section in
cssanimation-reference.mdtitled "Letter Animations Class" - Automated placement of the letter class section after
cssanimation.cssfor improved logical flow
- Improved
extract-class-names.jsscript structure and maintainability - Enhanced code readability with extensive inline comments to help future contributors
## cssanimation.css
- `.ca__ease-in`
- `.ca__delay-500`
## Letter Animations Class
- `.ca__leFadeIn`
- `.ca__leZoomOut`
## cssanimation-utility.css-
Scoped Class Naming
Introduced.ca__sequenceand.ca__randomclass names to replace.sequenceand.random. This avoids conflicts with third-party styles or libraries and improves maintainability across large projects and frameworks. -
HTML-Aware Text Animation
Updated the animation engine to traverse DOM nodes recursively. Now it wraps only pure text characters in<span>tags for animation while leaving nested HTML elements (like<span>icons,<strong>, etc.) untouched.
-
Fully tested in latest versions of:
- Chrome, Firefox, Safari, Edge, Opera
- iOS & Android mobile browsers
-
Compatible with:
- React (via
useEffector DOMref) - jQuery
- Vanilla JS / Web Components
- React (via
-
Replace old class references:
- <div class="sequence"> - <div class="random"> * <div class="ca__sequence"> * <div class="ca__random">
Released: May 2025
Tag: v2.0.4
Focus: Clean publish, modular structure, and future-friendly folder refactor
-
Dist-Only Publishing to NPM Package is now cleaner and production-focused. Only the
dist/folder is published, reducing size and removing dev clutter. -
New Folder Structure Modular CSS animations (e.g.,
fade.css,rotate.css,zoom.css) have been moved into a newdist/modules/directory for better organization.
Released: May 2025
Tag: v2.0.3
Focus: Clean publish and future-friendly folder refactor
This release refines the package for real-world usage and distribution by publishing only the compiled assets in the dist/ folder. It ensures consumers get exactly what they need—no build tools, no source clutter, just pure animations.
dist/-only NPM package Reduced package size by excluding source files, configs, and dev tools — only production-ready assets are now shipped.- Cleaned Up File Structure Improved maintainability by restructuring with a modular CSS build system and separating utility/animation modules.
Updated the package.json files field to explicitly include:
- dist/
- README.md
- LICENSE