Skip to main content
vkialka
January 24, 2023
Question

Override images in interactive components/variants with zoom effect on hover

  • January 24, 2023
  • 30 replies
  • 10112 views

Trying to override images so that the image zooms in on hover, but all it does is show the original image from the hover variant. Any ideas? Tks!!

This topic has been closed for replies.

30 replies

Simon_Dunford
January 24, 2023

I have the same issue… My thinking is the bug happens because my image hover state is a component nested inside another component… I don’t want to detach but this might be the only solution for now? Let me know if you found a workaround.

tank666
January 24, 2023
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
vkialka
vkialkaAuthor
January 25, 2023

@tank666 this works fine as long as you don’t override the images. Or could you figure this out as well?

tank666
January 25, 2023

Have you looked at the file I linked to in the post above? Because it has no problems with overrides.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Karen25
January 27, 2023

Hey @tank666 thanks for sharing your example. I’ve been facing the same issue as @vkialka. I did look at your file and tried to fix mine based on yours but no luck. I’m able to replace the default img (‘resting’ state in my case) but when I hover, it keeps showing the original one (the one I created the component set with). I’ve also tried changing the image by viewing the component’s “hover” state - but when I view it in presentation mode, the result is the same. I’ve also tried adding a instance swap property and setting the img to it. The default state img changes but on hover it shows the original one only. Here’s my example https://www.figma.com/file/UAH25ZvNQEdyUg6a5sd1vX/Example?node-id=0%3A1&t=GKZZytvSJwBLM8gc-1

Thanks for any ideas on how to fix it.

tank666
January 28, 2023

I looked at your file and noticed a difference in the images in variants: one of them you changed the fill mode (crop). Instead, scale the image and place it in a frame with the “Clip content” property turned on.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Karen25
January 30, 2023

hey @tank666 it worked. Thanks a lot for the help 🙂

vkialka
vkialkaAuthor
January 30, 2023

Tks so much @tank666. It does work as long as you don’t work using aspect ratio images. But tks!!

vkialka
vkialkaAuthor
January 30, 2023

@Tank found a workaround!! Tks for your help

vkialka
vkialkaAuthor
January 30, 2023

@tank666 @Karen25 @Simon_Dunford so here’s a file if you guys are interested:

Figma – 30 Jan 23