263

Image Swap on Hover

A product card swaps to a second-angle photo on hover, with dots switching below

Image & mediaHover & clickSwitchUI interactionCSSCSS hover

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

An e-commerce product card: the main product image on top; on hover the second photo (e.g. styled or back view) fades in and eases from 1.08× back to normal size while the main image fades out and zooms slightly, for a soft image swap; two small dot indicators under the image switch to show which photo is showing; the product name and price sit below. (CSS: both images absolutely positioned in the same frame, swapping opacity and scale on :hover with a transition of about 0.5–0.7 s)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More image & media effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →