Six ways to animate pictures on hover with Tailwind: zoom inside a frame, black and white to colour, a slide-up project overlay, a tilting album cover with a coloured shadow, a product photo that swaps to the back view and a panorama that pans.
A framed picture that zooms gently on hover while a caption bar stays put along the bottom. The figure clips the zoom with overflow-hidden and the caption sits on a dark translucent strip for contrast.
A row of pictures shown in black and white that bloom into colour on hover, a tidy look for client logos or team photos. grayscale and hover:grayscale-0 are filter utilities, so the transition is smooth.
A portfolio tile where a dark panel with the project name and a link slides up over the picture on hover or focus. On touch screens the panel is shown from the start, so the link is never hidden.
An album cover that turns a few degrees and casts a coloured shadow on hover. Coloured shadows come from shadow-violet-500/40 style utilities, which tint the shadow to match the picture.
A product photo that cross-fades to a second view on hover, as shops do to show the back of a garment. The second picture is stacked on top with opacity-0 and fades in with group-hover:opacity-100.
A wide panorama in a narrow frame slowly pans from left to right while hovered. The background is twice the frame's width, and a long transition on background-position does the camera move.
View code
<figure class="w-64 max-w-full">
<div role="img" aria-label="Panorama of hills under a setting sun" class="h-36 rounded-2xl bg-[radial-gradient(circle_at_80%_45%,#fde68a_0_6%,transparent_7%),radial-gradient(ellipse_at_20%_100%,#065f46_0_40%,transparent_41%),radial-gradient(ellipse_at_65%_110%,#047857_0_45%,transparent_46%),linear-gradient(#fb923c,#be185d)] bg-[length:200%_100%] bg-left transition-[background-position] duration-[3000ms] ease-in-out hover:bg-right motion-reduce:transition-none"></div>
<figcaption class="mt-2 text-sm text-slate-300">Hover to pan across</figcaption>
</figure>
About these Tailwind Image Hover Effects
Filters are utilities
grayscale, blur-sm, brightness-75 and their hover: versions transition smoothly with transition.
Coloured shadows
shadow-2xl shadow-violet-500/40 tints the shadow, which looks natural under colourful images.
Swap with opacity
Stack the second image on top with absolute inset-0 opacity-0 and fade it in with group-hover:opacity-100. Describe both views in their alt text.
Alt text still matters
These demos use gradient placeholders with role="img" and a label; with real photos, use img elements with meaningful alt text.
Frequently asked questions
Will these work with real photos?
Yes. Replace each placeholder div with an img and keep the same classes, adding object-cover where needed.
Do they work on phones?
The overlay demo shows its panel permanently on touch screens; the others are decoration and lose nothing.