Animation
Showcase

150+ CSS & JS animations. Scroll to explore, hover to interact, click to toggle. Each card shows the technique used.

Astro Preact Tailwind CSS

Fade Animations

Opacity transitions — the foundation of smooth UI

Fade In

opacity: 0 → 1\ntransition: opacity 0.6s ease

Fade In Up

opacity: 0 → 1\ntranslateY: 30px → 0\ntransition: 0.6s ease-out

Fade In Down

opacity: 0 → 1\ntranslateY: -30px → 0\ntransition: 0.6s ease-out

Fade In Left

opacity: 0 → 1\ntranslateX: -40px → 0\ntransition: 0.6s ease-out

Fade In Right

opacity: 0 → 1\ntranslateX: 40px → 0\ntransition: 0.6s ease-out

Fade In Scale

opacity: 0 → 1\nscale: 0.8 → 1\ntransition: 0.6s ease-out

Scale & Transform

Hover over the elements to see scale animations

Scale Up (Hover)

transform: scale(1.15)\ntransition: 0.3s ease

Scale Down (Hover)

transform: scale(0.85)\ntransition: 0.3s ease

Scale + Shadow (Hover)

scale(1.1) + box-shadow\ntransition: 0.3s ease

Bounce Scale (Hover)

scale(1.15)\ntransition: cubic-bezier(0.34, 1.56, 0.64, 1)

Squish (Hover)

scaleX(1.1) scaleY(0.9)\ntransition: 0.3s ease

3D Flip Y (Hover)

rotateY(180deg)\ntransition: 0.6s ease\nperspective: 600px

Rotation & Spin

Continuous and triggered rotation effects

Continuous Spin

@keyframes spin\n  rotate(0 → 360deg)\n  animation: 2s linear infinite

Reverse Spin

@keyframes spin\n  rotate(360 → 0deg)\n  animation: 3s linear infinite

Swing / Pendulum

@keyframes swing\n  rotate(-15 → 15deg)\n  animation: 1s ease-in-out infinite

Wobble

@keyframes wobble\n  translateX + rotate\n  animation: 1s ease-in-out infinite

3D Rotate X

@keyframes rotateX\n  rotateX(0 → 360deg)\n  perspective: 600px

3D Rotate Y

@keyframes rotateY\n  rotateY(0 → 360deg)\n  perspective: 600px

Slide & Translate

Elements sliding into view on scroll

Slide In Left

translateX: -100% → 0\ntransition: 0.7s ease-out

Slide In Right

translateX: 100% → 0\ntransition: 0.7s ease-out

Slide In Top

translateY: -100% → 0\ntransition: 0.7s ease-out

Slide In Bottom

translateY: 100% → 0\ntransition: 0.7s ease-out

Slide + Rotate

translateX(-80px) rotate(-10deg) → 0\ntransition: 0.8s ease-out

Elastic Slide

translateX(-100%) → 0\ncubic-bezier(0.68, -0.55, 0.265, 1.55)

Bounce & Spring

Playful bouncing and spring physics effects

Soft Bounce

@keyframes bounce\n  translateY(0 → -20px)\n  ease-in-out infinite

Hard Bounce

@keyframes bounce\n  cubic-bezier timing\n  realistic gravity feel

Jello

@keyframes jello\n  skewX + skewY oscillation\n  animation: 2s infinite

Rubber Band

@keyframes rubberband\n  scaleX/scaleY oscillation\n  elastic stretch effect

Heartbeat

@keyframes heartbeat\n  scale(1 → 1.3) double pulse\n  animation: 1.5s infinite

Float

@keyframes float\n  translateY + slight rotate\n  gentle floating motion

Pulse & Glow

Attention-grabbing pulsing and glowing effects

Pulse Scale

@keyframes pulse\n  scale(1 → 1.05)\n  opacity oscillation

Ping Ring

@keyframes ping\n  scale(1 → 2), opacity(1 → 0)\n  notification-style ring

Glow Indigo

@keyframes glow\n  box-shadow oscillation\n  neon glow effect

Glow Emerald

@keyframes glow\n  box-shadow: 5px → 60px spread\n  green neon glow

Glow Rose (Intense)

@keyframes glow\n  box-shadow: 5px → 80px spread\n  intense pink glow

Shimmer

@keyframes shimmer\n  background-position sweep\n  loading skeleton effect

Text Animations

Typography effects and text reveals

Typewriter

|
setInterval letter by letter\n+ blinking cursor\nclassic typewriter effect

Count Up

0

users

Animated number counter\n0 → target over 2s\ntabular-nums for alignment

Gradient Text

Gradient Text
background: linear-gradient\nbackground-clip: text\nanimated background-position

Wave Text

ANIMATION
per-character translateY\nstaggered animation-delay\nwave motion effect

Blur In

Focus Effect
filter: blur(10px) → blur(0)\nopacity: 0 → 1\nanimation: 0.8s ease-out

Clip Reveal

Reveal Me!
clip-path: inset(0 100% 0 0)\n→ inset(0 0 0 0)\ncurtain reveal effect

Loaders & Spinners

Loading indicators and progress animations

Spinner Ring

border: 3px solid\nborder-top-color: transparent\nanimation: spin 0.8s linear infinite

Bouncing Dots

3 dots with scale(0 → 1)\nstaggered animation-delay\nclassic loading pattern

Bar Loading

scaleX: 0 → 1 → 0\ntransform-origin switch\nsliding bar loader

Orbit

rotate(0 → 360deg)\ntranslateX for radius\ncounter-rotate to stay upright

Morphing Shape

@keyframes morph\nborder-radius transitions\n+ rotation for organic feel

SVG Dash Spinner

stroke-dashoffset animation\n+ rotation\nsmooth arc spinner

Hover Effects

Interactive hover animations for buttons and cards

Button Lift

translateY(-3px)\nbox-shadow increase\ntransition: 0.3s ease

Border Glow

Card
box-shadow glow on hover\nborder-color transition\nsubtle to vivid

Fill Sweep

background-size: 0% → 100%\nor pseudo-element width\nleft-to-right fill

Tilt 3D

3D Tilt
rotateX + rotateY on hover\nperspective: 800px\n3D card tilt effect

Underline Expand

pseudo-element width: 0 → 100%\nfrom center\nlink hover effect

Icon Rotate + Color

āš™
rotate(360deg) on hover\ncolor transition\ninteractive icon feedback

Stagger & Cascade

Sequential animations with staggered delays

Staggered List

Design
Develop
Deploy
Iterate
Scale
Profit
// Stagger delay: each item gets i * 100ms
transitionDelay: `${index * 0.1}s`

Cascade from Left

Authentication
Database Layer
API Gateway
Frontend App
// Cascade: translateX(-60px) → 0
// Progress bars animate after items appear

Scale Pop-in

// Scale pop: scale(0) → scale(1)
// Bounce easing: cubic-bezier(0.34, 1.56, 0.64, 1)
// Very fast stagger: 50ms between items

Background Animations

Animated gradients and background effects

Gradient Shift

background: linear-gradient\nbackground-size: 300%\nanimated background-position

Gradient Mesh

multiple radial-gradients\noverlapping animated positions\norganic mesh look

Animated Stripes

repeating-linear-gradient\n45deg diagonal stripes\nbackground-position animation

Aurora Effect

multiple blur layers\noverlapping gradients\nslow position animation

Dot Grid

radial-gradient dots\nbackground-size: 20px 20px\nsubtle animated opacity

Conic Gradient Spin

conic-gradient\nanimation: spin 3s linear infinite\ncolorful wheel effect

State Transitions

Click to toggle state — smooth transitions between states

Toggle Switch

translateX(0 → 24px)\nbackground-color transition\nsmooth 0.3s ease

Accordion

This content smoothly expands and collapses using max-height transition. No JavaScript height calculation needed!
max-height: 0 → 200px\noverflow: hidden\ntransition: 0.4s ease-out

Color Morph

background: gradient shift\nborder-radius morph\ntransition: 0.5s ease

Tab Indicator

translateX based on active tab\nwidth transition\nsmooth tab switching

Animated Checkbox

scale(0 → 1) + stroke\nstroke-dashoffset animation\nsmooth check mark

Hamburger → X

3 spans rotating + fading\nline 1: rotate(45deg)\nline 3: rotate(-45deg)

Canvas Animations

GPU-friendly canvas-based effects

Connected Particles

// Canvas 2D particles
// Lines drawn between nearby particles
// Bounce off edges

Sine Waves

// Multiple sine waves
// Different amplitude, frequency, speed
// Overlapping transparency

Scroll-Driven

Animations that respond to scroll position

Scroll Progress

67%
width based on scrollY
relative to section position
smooth progress indication

Parallax Layers

3 layers at different speeds
translateY: scroll * -0.05/0.12/0.2
parallax depth effect

Scale on Scroll

scale(0.5 → 1.3)
rotate(0 → 180deg)
opacity(0.3 → 1) on scroll

Horizontal Scroll

1
2
3
4
5
6
7
8
9
10
translateX based on scrollY
horizontal movement from vertical scroll
card carousel effect

Crazy Animations

Over-the-top effects for maximum visual impact

Glitch Text

GLITCH
clip-path slicing\nmultiple offset color layers\nskew + translate flicker

Morphing Blob

border-radius keyframes\norganic shape morphing\n+ gradient color cycling

Black Hole

multiple orbit animations\naccretion disk spin\npulsing glow core

DNA Helix

3D rotateY with perspective\nsin/cos positioning\npreserve-3d depth

Liquid / Goo

SVG goo filter (feGaussianBlur\n+ feColorMatrix)\nblobs merge and separate

Vortex Rings

8 nested rotating rings\nalternating directions\nvarying speed + opacity

Portal

nested spinning rings\norbiting particles with\ncustom CSS variables

Matrix Rain

Canvas 2D
Random katakana characters
Fading trail effect

Fireworks

Canvas particle system
50 particles per explosion
gravity + fade out

Electric Arc / Lightning

Recursive midpoint displacement
Canvas shadow glow
Random branching lightning bolts

Micro-Interactions

Small, delightful interactions that make UIs feel alive

Like Heart

burst ring effect on click\nbounce animation scale\ngrayscale toggle filter

Ripple Button

Material Design ripple\nspawn at click position\nscale(0 → 4) + fade

Magnetic Button

transform follows cursor\nmouse position offset * 0.3\nsmooth transition on leave

Progress Button

idle → loading → done\nprogress fill animation\ncheck mark pop-in

Skeleton Loading

shimmer gradient animation\nbackground-position sweep\nplaceholder layout

Notification Bell

bell-ring rotation keyframes\ntransform-origin: top center\nbadge pop scale animation

3D Transforms

Perspective and 3D space animations

3D Card Flip

♦
FRONT
ā˜…
BACK
transform-style: preserve-3d
backface-visibility: hidden
:hover → rotateY(180deg)
transition: 0.8s

3D Cube Spin

Front
Back
Right
Left
Top
Bottom
@keyframes cubeSpin
  rotateX + rotateY (0→360deg)
transform-style: preserve-3d
animation: 4s linear infinite

3D Carousel

@keyframes carouselSpin
  rotateY(0 → 360deg)
children: rotateY(n*60deg)
  translateZ(130px)

Perspective Tilt

ā–
Move your
mouse here
onMouseMove → calc rotateX/Y
perspective(600px)
transition: 0.1s ease-out
tilt toward cursor position

3D Fold

Panel 1
Panel 2
Panel 3
Panel 4
Click to unfold
transform-origin: top
rotateX(-90deg → 0deg)
transition: 0.6s ease
accordion fold/unfold in 3D

3D Flip Text

FLIPĀ 3D
@keyframes flipLetter
  rotateX(0 → 360deg)
animation-delay: i * 0.12s
stagger per character

3D Layered Parallax

z: 0
z: 30
z: 60
z: 90
transform-style: preserve-3d
layers at translateZ(20-80px)
@keyframes parallaxFloat
subtle depth illusion

3D Door Open

Behind
the door
DOOR
Click to open
transform-origin: left center
rotateY(0 → -110deg)
perspective: 800px
transition: 0.8s ease

3D Book Page Turn

Left
Page
Next
Page
āœŽ
Page 1
ā˜…
Page 2
Click to turn page
transform-origin: left center
rotateY(0 → -180deg)
perspective: 1200px
page flip with backface

SVG Animations

Scalable vector graphics in motion

SVG Path Draw

stroke-dasharray: 800
stroke-dashoffset: 800 → 0
complex path self-draws

SVG Morph

circle → star → square
opacity crossfade morph
3s infinite cycle

SVG Line Draw Signature

stroke-dasharray per segment
staggered dashoffset → 0
handwriting reveal effect

SVG Animated Logo

PREACT
letters stagger in
translateY + scale + opacity
0.15s delay per letter

SVG Pulse Rings

concentric expanding rings
r: 8 → 55, opacity: 1 → 0
staggered 0.6s delays

SVG Circular Progress

0%Complete
stroke-dasharray: 283
stroke-dashoffset animated
percentage text counter

SVG Wave Line

sine wave path repeating
translateX shift animation
clipped to viewport

SVG Animated Chart

bar chart with scaleY(0 → 1)
staggered per bar
transform-origin: bottom

SVG Gear System

interlocking gears
rotate CW + CCW
tooth mesh alignment

Clip-Path Animations

Shape masking and reveal effects

Circle Reveal

clip-path: circle(0% at 50% 50%)
  -> circle(70% at 50% 50%)
animation: 3s ease-in-out infinite

Polygon Morph

clip-path: polygon(...)
triangle -> pentagon -> star -> circle
animation: 5s ease-in-out infinite

Diagonal Wipe

clip-path: polygon(0 0, 0 0, 0 100%, 0 100%)
  -> full rectangle
animation: 3s ease-in-out infinite

Iris Wipe

clip-path: circle(0% at 50% 50%)
  -> circle(70%) // hold
  -> circle(0%) // close
animation: 2.5s infinite

Shutter Effect

clip-path: polygon(...)
5 horizontal slats expanding
like window blinds
animation: 3s ease-in-out infinite

Diamond Reveal

clip-path: polygon(
  50% 50%, 50% 50%,
  50% 50%, 50% 50%)
  -> diamond shape
animation: 2.5s infinite

Star Morph

clip-path: polygon(...)
4-point star -> 6-point
  -> 8-point -> loop
animation: 3s infinite

Wave Clip

clip-path: polygon(...)
wavy bottom edge shifts
phase back and forth
animation: 2s infinite

Split Reveal

clip-path: polygon(
  50% 0%, 50% 0%,
  50% 100%, 50% 100%)
  -> full rectangle
animation: 3s infinite

CSS Filter Animations

Blur, color, and visual effect transitions

Hue Rotate

filter: hue-rotate(0deg)
animation: hue-rotate 3s linear infinite
cycles through all colors

Blur In/Out

filter: blur(0px) -> blur(8px)
animation: blur-pulse 3s ease-in-out infinite
pulsing blur effect

Brightness Pulse

filter: brightness(0.5) -> brightness(1.5)
animation: brightness-pulse 2s ease-in-out infinite
oscillating brightness

Saturate Cycle

filter: saturate(0) -> saturate(3)
animation: saturate-cycle 4s ease-in-out infinite
grayscale to super-saturated

Contrast Shift

filter: contrast(0.5) -> contrast(2)
animation: contrast-shift 3s ease-in-out infinite
image pops in and out

Invert Flash

filter: invert(0) -> invert(1)
animation: invert-flash 2s ease infinite
brief strobe-like flashes

Sepia to Color

filter: sepia(1) -> sepia(0)
animation: sepia-to-color 4s ease-in-out infinite
transition from sepia to full color

Drop Shadow Dance

filter: drop-shadow(...)
animation: drop-shadow-dance 2s ease infinite
shadow moves around the element

Combined Filters

filter: hue-rotate() blur() brightness()
all three animating simultaneously
complex multi-filter composition

Marquee & Ticker

Infinite scrolling and ticker effects

Horizontal Marquee

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
Duplicate content for seamless loop

Reverse Marquee

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
Start offset, scroll to 0

Vertical Ticker

Breaking: CSS animations are awesome
Update: Preact 10.x released with hooks
New: Tailwind CSS v4 is here
Trending: Marquee effects are back
Alert: Infinite scrolling done right
Flash: GPU-accelerated transforms FTW
Breaking: CSS animations are awesome
Update: Preact 10.x released with hooks
New: Tailwind CSS v4 is here
Trending: Marquee effects are back
Alert: Infinite scrolling done right
Flash: GPU-accelerated transforms FTW
@keyframes ticker-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
Duplicate items, overflow hidden

Logo Carousel

Acme
Nova
Pulse
Orbit
Flux
Spark
Helix
Prism
Acme
Nova
Pulse
Orbit
Flux
Spark
Helix
Prism
mask-image: linear-gradient(
  to right, transparent,
  black 15%, black 85%,
  transparent
)
Fade edges hide seam

Speed Variants

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
Slow 35s|Medium 18s|Fast 8s
animation-duration: 35s; /* slow */
animation-duration: 18s; /* medium */
animation-duration: 8s;  /* fast */
Same keyframes, different speeds

Hover Pause

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip

Hover to pause

.container:hover .track {
  animation-play-state: paused;
}
Pauses on mouse hover

Alternating Rows

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
Row 1: marquee-left
Row 2: marquee-right
Opposite directions create
a dynamic layered look

Gradient Fade Edges

DesignDevelopDeployIterateScaleAnimateCreateShipDesignDevelopDeployIterateScaleAnimateCreateShip
mask-image: linear-gradient(
  to right,
  transparent 0%,
  black 15%,
  black 85%,
  transparent 100%
)
Smooth edge fade with CSS mask

Spring & Physics

Real physics-based motion and elastic effects

Spring Drag

drag the ball
F = -kx - bv
requestAnimationFrame loop
pointer events + snap back

Elastic Modal

spring-pop-in keyframes
scale overshoot: 1 → 1.15 → 0.92
cubic-bezier(0.34, 1.56, 0.64, 1)

Spring Chain

drag the orange ball
5 connected spring bodies
each follows the previous
F = k * (prev.x - curr.x) - bv

Bouncy Scroll Indicator

Scroll Down
spring toward alternating target
F = -k(y - target) damped
smooth arrow bounce loop

Springy Toggle

OFF
spring to target (0 or 28px)
initial velocity kick for overshoot
F = -k(x - target) - bv

Gravity Drop

v += gravity each frame
bounce: v = -v * restitution
staggered drop timing

Pendulum

angular accel = -(g/L)*sin(Īø)
damping * 0.997 per frame
resets when energy depleted

Elastic Pull

pull down
drag down with 0.6x resistance
spring snap-back on release
scaleY stretch while pulling

Newton's Cradle

5 pendulums with collision
elastic momentum transfer
angular physics + damping

Border Animations

Animated borders, outlines, and edge effects

Gradient Border Spin

Spinning
/* Rotating conic-gradient border */
.box::before {
  background: conic-gradient(...);
  animation: spin 3s linear infinite;
}
.box::after {
  inset: 3px;
  background: #1e1b2e; /* mask inner */
}

Neon Border Pulse

Neon Glow
@keyframes neon-pulse {
  0%,100% { box-shadow: 0 0 5px cyan; }
  50% { box-shadow: 0 0 25px cyan,
    0 0 50px cyan; }
}
border-color animates with glow

Border Draw

Draw Me
/* 4 spans, one per side */
.top    { animation: draw-top 0.5s; }
.right  { animation: draw-right 0.5s 0.5s; }
.bottom { animation: draw-bottom 0.5s 1s; }
.left   { animation: draw-left 0.5s 1.5s; }

Dashed Border March

Marching
<svg><rect
  stroke-dasharray="8 8"
  stroke-dashoffset animates
  animation: march 1s linear infinite
/></svg>

Rainbow Border

Rainbow
background: linear-gradient(
  90deg, rose, amber, emerald,
  cyan, indigo, violet, rose
);
background-size: 300%;
animation: shift 3s linear infinite;

Border Trace

Tracing
/* Glowing dot traces the border */
conic-gradient(
  transparent 340deg,
  violet 345deg, cyan 355deg,
  transparent 360deg
);
animation: rotate 3s linear infinite;

Double Border Pulse

Double
/* Two concentric borders */
outer: box-shadow pulse (rose)
inner: box-shadow pulse (violet)
/* Alternate timing with delay */

Corner Accents

Corners
/* Animated corner brackets */
.corner {
  border-top + border-left: 2px;
  animation: expand 2s infinite;
}
/* Each corner delayed 0.5s */

Morphing Border Radius

Morphing
@keyframes morph {
  0%   { border-radius: 60% 40% 30% 70%
         / 60% 30% 70% 40%; }
  50%  { border-radius: 50% 60% 30% 60%
         / 30% 60% 70% 40%; }
}
Organic blob shape transitions

Cursor & Mouse Effects

Interactive mouse-following animations

Cursor Trail

Move your cursor here
// Store last N mouse positions
const [trail, setTrail] = useState<Dot[]>([]);
setTrail(prev => [...prev.slice(-19), newPos]);
// Render with decreasing size & opacity

Spotlight Effect

Hidden Treasure

Explore the darkness

Hover to reveal
// Dark overlay with radial-gradient cutout
background: radial-gradient(
  circle 80px at ${x}px ${y}px,
  transparent 0%, rgba(0,0,0,0.92) 100%
);

Magnetic Elements

Attract the dots
// Calculate distance to cursor
const dist = Math.sqrt(dx*dx + dy*dy);
if (dist < maxDist) {
  const force = (1 - dist/maxDist) * 35;
  target += (dx/dist) * force; // attract
}

Repel Particles

// Repel force: opposite of magnetic
const force = (repelRadius - dist) / repelRadius;
p.vx += (dx / dist) * force; // push away
// Spring back: p.vx += (baseX - p.x) * 0.02;

Cursor Ripple

Move slowly for ripples
// Spawn ripple at cursor on move
const age = (now - ripple.born) / duration;
const scale = 1 + age * 3;
const opacity = 1 - age;
// Clean up expired ripples periodically

Tilt Card

4242 **** **** 1234
INTERACTIVE CARD
// Map mouse position to rotation
const rotateX = (0.5 - y) * 30;
const rotateY = (x - 0.5) * 30;
// Light reflection follows cursor
radial-gradient(at ${x}% ${y}%, white, transparent)

Morphing & Liquid

Organic shapes, fluid dynamics, and blob effects

Lava Lamp

<feGaussianBlur stdDeviation="10" />
<feColorMatrix values="...20 -10" />
SVG goo filter merges blobs

Metaball

4 circles + SVG goo filter
feGaussianBlur + feColorMatrix
merge when overlapping

Water Drop

SVG <animate> for drop path
ellipse ripples on impact
splash particles on collision

Breathing Circle

border-radius: 40% 60% 60% 40%
  / 60% 30% 70% 40%
animated organic blob morph

Liquid Fill

translateY for fill level
SVG wave path on top surface
two wave layers, opposite direction

Plasma

canvas putImageData per-pixel
sin/cos color patterns
v = sin(x) + sin(y) + sin(x+y) + sin(sqrt(...))

Smoke

canvas radialGradient particles
rise with turbulent vx drift
fade via alpha over lifetime

Blob Grid

3x3 grid of gradient blobs
border-radius morph keyframes
staggered animation-delay

Elastic String

Click anywhere on the string
spring tension + damping physics
wave propagation via spread factor
click to pluck, vibrates naturally