Webflow sync, pageviews & more.
NEW

Can I use Webflow interactions or another method to swap images on hover or when clicking a link on the page?

TL;DR
  • Stack two images in a container with absolute positioning, hiding the second one using opacity or display settings.
  • Use Webflow Interactions (Hover or Click) to toggle visibility by animating opacity or display properties, supporting both static and CMS content.

You can use Webflow interactions to swap images on hover or when clicking a link. This is commonly done with Mouse Hover or Click (Tap) triggers combined with Show/Hide, Opacity, or Image Replace actions.

1. Prepare Image Elements

  • Add both images (the default and the swapped version) to your Webflow canvas.
  • Stack them inside the same parent container (e.g., a div) and set them to absolute positioning so they overlap.
  • Hide the second image initially by setting its opacity to 0% or display: none.

2. Use Hover Interaction to Swap Images

  • Select the parent container or the image that will trigger the hover.
  • Go to the Interactions panel and create a Mouse Hover (Hover In/Out) interaction.
  • For Hover In, add an animation that:
  • Sets opacity of Image A to 0%
  • Sets opacity of Image B to 100%
  • For Hover Out, reverse the animation:
  • Sets opacity of Image A back to 100%
  • Sets opacity of Image B back to 0%

3. Use Click Interaction to Change Image

  • Select the image or link block that will be clicked.
  • Go to the Interactions panel and create a Click (Tap) interaction.
  • Add an animation to:
  • Hide or fade out the current image
  • Show or fade in the new image
  • You can also use "Toggle" action steps if you want to allow toggling between two images with multiple clicks.

4. Optional: Use Webflow CMS for Dynamic Swaps

  • If you're in a CMS Collection List, bind both images to CMS fields.
  • Use the same hover or click interaction method as above.
  • This lets you dynamically swap images based on CMS data.

Summary

You can swap images on hover or click in Webflow by layering two images and using interactions to toggle their visibility with opacity, display, or other animation effects. It works for both static and CMS-driven content.

Rate this answer

Other Webflow Questions