Skip to main content
Question

Two buttons, change to different image on hover

  • March 4, 2024
  • 1 reply
  • 449 views

Bilal_Padia

Hey there. I have a query about a module I’m designing where there are two buttons to select from. I want to be able to change the default background to a specific image when either button is hovered over. Is this achievable? Can anyone help?

This topic has been closed for comments

1 reply

Haroll
  • Active Member
  • 273 replies
  • March 4, 2024

Hi @Bilal_Padia

I have a working solution that need a component modification, so maybe it’s note for you

I added a rectangle (img bg) with:

  • an absolute position
  • constraint set to left and right and top and bottom (so it always cover the entire button)
    When button is in its default states (hovered=false on the image below) I set img bg’s opacity to 0. When button is hovered, opacity is then set to 1

Since img bg layer is always displayed on the instance (regardless of it state) you will be able to set an image as its fill and it should work just fine

Let me know if it works for you


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings