Animation Snippets — Free HTML CSS JS Animation Effects
143 animation components · Gradient Text, Typewriter, Aurora, Floating Particles, Fireworks, Custom Cursor, 3D Tilt, Matrix Rain & more · Exports to React, Vue, Angular & Tailwind
What's included
Features
About this category
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
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.
All 143 animations snippets, A to Z
- 3D Card Tilt
- 3D Cube Rotate Panel Transition
- 3D Marquee
- 3D Swipe Card Stack
- Analog Clock
- Animated Beam
- Animated Error State
- Animated Grid Background
- Animated Success Checkmark
- Animated Task List
- Anime.js Ripple Grid
- Anime.js Stagger Grid
- Anime.js SVG Shape Morph
- Aurora Background
- Avatar Stack Fan Expand
- Babylon.js Particle Fountain
- Background Boxes
- Barba.js Page Transition
- Box Reveal
- Bubble Wrap Popper (Stress Relief)
- Canvas Boids Flocking Simulation
- Canvas Fireworks Physics
- Canvas Fluid Cursor Trail
- Canvas Fractal Tree Generator
- Canvas Generative Truchet Pattern
- Canvas Gravity Particle Orbits
- Canvas Kaleidoscope Drawing
- Canvas Mesh Gradient Background
- Canvas Metaball Blobs
- Canvas Noise Terrain Generator
- Canvas Noise Texture Background
- Canvas Pixelate Image Reveal
- Canvas Procedural Lightning
- Canvas Rainbow Mouse Trail
- Canvas Ripple Click Effect
- Canvas Rope Physics
- Canvas Snow Overlay
- Canvas Star Trail Cursor
- Canvas Water Ripple Simulation
- Canvas Wave Background
- Card Grid Hover Focus Dim
- Circular Reveal Theme Toggle (View Transitions API)
- Corner Peel Hover Reveal Card
- Count Up Animation
- CSS 3D Cube
- CSS Animated Gradient Border
- Cursor Circle Image Reveal
- Cursor Particle Brush Trail
- Cursor Spotlight Reveal
- Cursor Text Label
- Custom Cursor
- CustomBounce Ball
- CustomWiggle Icons
- Dark Mode Toggle
- Dice Roller
- Dot Pattern
- Double-Tap to Like
- DrawSVG Success Check
- Dynamic Island
- FAB Container Transform Sheet
- Filter Icon Active-State Morph
- Fireworks
- Flickering Grid
- Flip Clock
- Flip Countdown
- FLIP Technique List Reorder Animation
- Floating Particles
- Gear-to-Checkmark Icon Morph
- Gooey Menu
- GSAP Draggable Inertia
- GSAP Flip Layout Transition
- GSAP quickTo Cursor
- Hover Image Trail
- Icon Grid Neighbor Pull
- Inbox Row Expand — Vanilla FLIP Detail View
- Jelly Icon Dock Hover
- KUTE.js SVG Shape Morph
- Layout Switcher Container Morph
- Liquid Swipe Page Transition
- Logo Marquee
- Loot Box Reveal Animation
- Magnetic Grid
- Matrix Rain
- Matter.js Ball Pit Hero Section
- Matter.js Confetti Cannon
- Matter.js Drag-and-Throw Physics Playground
- Matter.js Falling Tags
- Matter.js Newton's Cradle (Drag to Swing)
- Matter.js Rope Bridge You Can Cut
- Matter.js Soft-Body Jelly Blobs
- Morph SVG Icons
- Morphing Icon State Transitions (Play/Pause, Bookmark, Menu/Close)
- Morphing Liquid Blob
- Motion Path Plane
- Multiplayer Cursors
- Noise Grain Background
- Number Ticker
- Orbiting Icons
- p5.js Perlin Flow Field
- Page Flip
- Paper.js Vector Blob
- Particle Network
- Physics Balls
- Physics2D Particle Burst
- PhysicsProps Friction Pucks
- Pixi.js Particle Field
- Ripple Background
- Rive Interactive Icon
- Rough.js Sketchy Annotation Highlight
- Scratch Card Reveal
- Snap.svg Logo Draw Reveal
- Split Flap Display
- Spotlight Effect
- Stagger Grid Ripple
- Staggered List Animation
- Starfield
- Status Icon Morph — Spinner to Check/Cross
- Swup Page Transition
- Three.js Comet Trail
- Three.js Crystal Cluster
- Three.js Digital Grid Pulse
- Three.js DNA Helix
- Three.js Galaxy Spiral
- Three.js Holographic Globe
- Three.js Instanced Cube Wave
- Three.js Interactive Mesh Distortion
- Three.js Liquid Metal Sphere
- Three.js Magnetic Particles
- Three.js Morphing Blob
- Three.js Network Graph
- Three.js Orbit Rings
- Three.js Particle Wave
- Three.js Solar System
- Three.js Starfield Warp
- Three.js Synthwave Terrain
- Three.js Wave Ribbon
- Vanilla SVG Icon Morph (No Library)
- View Transitions Gallery
- Vivus SVG Line Draw
- Voice Assistant Orb
- Wavy Background
- WebGL Gradient Shader Background
- Zdog Pseudo-3D Orbit Scene