Forum Discussion
How to have states change if I have a transparent box on top?
Hello,
I'm trying to create a button to go to the next slide. To do this, I've selected an icon from the content library, a carrot ">". If I try to make the icon a trigger, it works fine to create different states for the icon based on whether a mouse hovers over it or it is clicked, but since the clickable area only follows the outline of the icon, I've created a transparent box on top of the icon that is the real trigger. However, this means now that any state changes for the underlying icon won't work when the mouse hovers over it or it is clicked. How do I fix this?
- ShaunMartin-c3bCommunity Member
Kia ora Susan,
You should be able to solve your issue by editing the normal state of your icon to include the transparent box, rather than adding the transparent box on top as a separate object.
Then you can add your triggers to the icon instead as your icon now includes the transparent box within its bounds.
Hope that helps.
- SarahHodgeFormer Staff
Hi Susan! Thanks for posting your question here! I personally like to group the icon with a transparent shape behind it so the button has a bigger clicking area making it easier to click. You can still add the different states to the icon, for example, a hover state. Because it's grouped, it will still show the hover state when hovered over the group as a whole. I created a story file with an example if you want to take a look. I hope that helps!