Production-ready CSS animations, free to copy
Every preview on this page runs on pure CSS — the exact code you copy. Filter by category, click a card for the full snippet, and paste it straight into your project. Then go deeper: CSS fundamentals — colours, specificity, z-index & responsive design ↓
Reduced motion is on. Your system prefers reduced motion, so previews are paused. The code you copy still includes everything.
No animations match your search. Try a broader term like “fade”, “dots” or “text”.
How to use these animations
- Copy the CSS. Click any card’s Copy CSS button — the snippet contains the class and its keyframes, fully self-contained.
- Paste it into your stylesheet. All classes are prefixed
fh-, so they won’t collide with your existing styles. Rename them freely.
- Add the class to your element. The card’s Code view shows a ready-made HTML usage example for every effect.
Respect users who prefer less motion. Add this once, globally, and every animation on your site will settle instantly for people who have reduced motion enabled in their OS settings:
Why these animations are fast: transform and opacity
Almost every effect in this library animates only two properties: transform and opacity. Browsers can hand these off to the GPU compositor, which means the animation runs on its own thread at 60fps even while JavaScript is busy. Animating layout properties like width, height, top or margin forces the browser to recalculate layout on every frame — the main cause of janky, stuttering motion on mid-range phones.
That is also why a pure-CSS approach beats pulling in a JavaScript animation library for simple UI motion: zero bundle weight, no main-thread work, and the browser can optimise the whole animation ahead of time. Save JavaScript animation for things CSS genuinely cannot express, such as physics, gestures, or interruptible timelines.
When (and when not) to animate
Good UI motion answers a question the user already has: where did this come from, what changed, what can I do next? Entrance animations orient the eye when content appears; hover effects confirm that an element is interactive; loaders reassure users that work is happening. Used this way, motion measurably improves perceived performance and task confidence.
The failure mode is decoration: animating everything, everywhere, on every scroll. Keep durations between 150ms and 600ms for interface feedback, reserve longer, looping effects for ambient backgrounds, and never gate a user’s next action behind an animation they must wait for. One well-placed effect reads as polish; ten read as noise.