Presets

CSS animation examples

5 presets. Open one to tune it and copy the code.

01 Animated arrow loop
02 Rotate 360° loop
NEON
03 Neon glow text loop
04 Blink loop
05 Heartbeat pulse loop

Small, self-contained CSS animations you can drop into a page: each one is a keyframe and a few elements, with every number exposed as a parameter. The Animated arrow cascades three border-drawn chevrons in any of four directions. Rotate 360 is the plain spin with control over direction and iteration count. Neon glow pulses a two-layer text-shadow around a headline. Blink toggles a live badge dot either smoothly or with a hard steps() cut. Heartbeat scales an SVG heart in the double-beat lub-dub rhythm.

These are good starting points for learning how keyframes, easing and animation properties interact, because you can change one value and watch the effect immediately.

Copy any example as CSS, as Tailwind classes with the keyframes for @theme or tailwind.config.js, or as a React component using Motion.

What is the difference between a CSS animation and a transition?

A transition animates between two states when a property changes, such as on hover. An animation uses @keyframes to define any number of steps and can run on its own, loop and alternate. The examples on this page are keyframe animations; the hover collection uses transitions.

Which CSS properties are cheapest to animate?

Transform and opacity, because browsers can run them on the compositor without recalculating layout or repainting. The arrow, rotate, blink and heartbeat examples use only those. The neon glow animates text-shadow, which repaints every frame, so keep it to short headlines rather than large blocks of text.

How do I respect reduced motion in CSS animations?

Wrap the animation declaration in @media (prefers-reduced-motion: no-preference), or set animation: none inside a reduce query. For looping decorative effects like glow and rotate, stopping is fine. For meaningful ones like a blinking live dot, show a static state instead so the information is kept.