Animation Snippets — Free HTML CSS JS Animation Effects

102 animation components · Gradient Text, Typewriter, Aurora, Floating Particles, Fireworks, Custom Cursor, 3D Tilt, Matrix Rain & more · Exports to React, Vue, Angular & Tailwind

Share & Support

What's included

Features

21 animation components — text, background, cursor, interactive, and abstract effects
Gradient text: background-clip:text + background-size:300% background-position shimmer
Aurora: radial-gradient orbs + mix-blend-mode:screen additive colour blending
Floating particles: Canvas 2D, mouse repel force vector, distance-based alpha connection lines
Custom cursor: lerp ring rx+=(mx-rx)*0.12, context-aware .clicking/.link states
Text scramble: requestAnimationFrame decode from 90-char random pool, progressive reveal
3D card tilt: normalised cursor offset → rotateX/rotateY, glow follows cursor position
Fireworks: polar coordinate particles, gravity physics, alpha fade, animationend cleanup
All effects: pure browser APIs — no GSAP, no Three.js, no library imports

About this tool

CSS Animation Snippets — Free, 21 Effects From Subtle Text Animations to Physics Fireworks

Animation communicates state, guides attention, and adds personality to an interface. The right motion makes a product feel premium and alive. The wrong motion creates distraction and perceived slowness. This is the largest collection in the library — 21 animation effects covering text, backgrounds, cursors, interactive patterns, and abstract visuals.

Every snippet uses CSS keyframes and vanilla JavaScript. No GSAP, no Framer Motion, no Three.js, no Particles.js. Pure browser APIs only.

Text animations: Gradient Text uses background-clip: text with a 300% background-size gradient that animates background-position — the gradient sweeps across the text, not the element. Typewriter uses a character-append loop with a variable delay, producing a realistic typing effect with a blinking cursor. Text Scramble uses requestAnimationFrame to decode from a random 90-character pool one frame at a time, revealing each correct character progressively. Wave Text staggers each letter with a custom CSS animation-delay. Glitch Text uses multiple text-shadow values that shift with a CSS keyframe for a distorted cyberpunk appearance. Stagger List animates each list item into view with an incrementing animation-delay.

Background effects: Aurora Background uses three radial-gradient orbs with mix-blend-mode: screen and a slow CSS drift animation. mix-blend-mode: screen adds colour values together, creating bright, glowing overlap regions between orbs. Floating Particles runs on Canvas 2D with a mouse repel force: each particle calculates its distance from the mouse and adds a repel vector when within the trigger radius. Connection lines between close particles fade their alpha based on distance. Matrix Rain renders falling character streams in Canvas columns.

Cursor effects: Custom Cursor replaces the default cursor with a dot and a lag ring. The ring uses linear interpolation (lerp): rx += (mx - rx) × 0.12 per frame — moving 12% of the remaining distance to the cursor each frame. This creates the signature smooth-follow feel. Context-aware classes (.clicking, .link) change the cursor appearance over interactive elements. Spotlight creates a radial gradient that follows the cursor, revealing content in a cone of light.

Interactive effects: 3D Card Tilt calculates rotateX and rotateY from the normalised mouse offset within the card. The glow element follows the cursor position. Dark Mode Toggle switches a :root CSS variable and saves preference to localStorage. Scroll Snap Gallery implements a horizontal card carousel using scroll-snap-type: x mandatory.

Abstract visuals: Fireworks creates particles on click with polar coordinate trajectories, gravity physics, and alpha fade. Liquid Blob animates a morphing SVG path between keyframes. Analog Clock draws a real-time clock face on Canvas.

Real-world uses

Common Use Cases

Hero sections, landing pages, and above-the-fold impact
Aurora Background and Floating Particles for ambient visual depth in hero sections. Gradient Text and Typewriter for animated headlines that draw the eye. Count-Up for social proof metrics (users, revenue, events) that animate into view on scroll.
Dark-themed, premium, cyberpunk, and gaming interfaces
Matrix Rain and Glitch Text for cyberpunk game UIs and hacker-aesthetic developer tool dashboards. Custom Cursor for creative agency portfolios and premium product sites. Neon Glow (Buttons category) pairs with these animation snippets for a complete dark theme.
Celebration moments, purchase confirmation, and achievement reveals
Fireworks for e-commerce order confirmation pages, subscription upgrade completions, and milestone achievement notifications. Stagger List for revealing reward items or feature unlocks one by one. Count-Up for animating a score or earned credit reveal.
Study advanced CSS, Canvas, and requestAnimationFrame techniques
Aurora teaches mix-blend-mode: screen additive blending. Floating Particles teaches Canvas 2D physics with a repel force vector. Custom Cursor teaches lerp for smooth follow animation. Text Scramble teaches requestAnimationFrame progressive decode patterns.
Interactive product showcases and scroll-based content reveals
3D Card Tilt for product feature cards and pricing tier showcases. Scroll Snap Gallery for horizontal image carousels and testimonial sliders. Reveal on Scroll for section entrance animations triggered by IntersectionObserver as the user scrolls down.
Replace GSAP, Three.js, and Particles.js with zero-bundle alternatives
The Floating Particles snippet replaces Particles.js for ambient backgrounds. The CSS 3D Cube replaces Three.js for simple 3D objects. Gradient Text replaces GSAP text gradient plugins. All use zero library overhead — pure browser APIs that work in any framework.

Got questions?

Frequently Asked Questions

All CSS animations use transform and opacity properties — handled by the GPU compositor without triggering layout recalculation or paint. Canvas-based animations (Floating Particles, Matrix Rain, Analog Clock, Fireworks) use requestAnimationFrame which syncs to the display refresh rate and pauses automatically when the tab is hidden. Test with Chrome DevTools Performance panel → record → check for long frames. The custom cursor lerp updates transform only, not left/top, to stay on the compositor.

Add @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } to your CSS. This near-instantly completes all animations for users who have enabled "Reduce motion" in their OS accessibility settings. For Canvas animations, check window.matchMedia("(prefers-reduced-motion: reduce)").matches in JavaScript and skip the animation loop or show a static frame.

Yes. Aurora Background and Floating Particles use absolute/fixed positioning and can be layered via z-index — Aurora behind, Particles on top. Gradient Text works on any heading element regardless of background. Custom Cursor is global via document event listeners and works with any page content. The Spotlight effect uses a pointer-events: none overlay so it never blocks clicks on the content below it.

All CSS-only animations (Gradient Text, Aurora, Typewriter, Wave Text, Glitch Text, Stagger List, Reveal on Scroll) work on mobile without changes. Mouse-dependent effects (Custom Cursor, Spotlight, 3D Card Tilt) require a pointer device and degrade or disappear on touch. Add @media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none } } to disable cursor elements on touch screens. The 3D Card Tilt can be adapted to work on touch by binding touchmove events and reading e.touches[0].clientX/Y.