Figma Support Forum

Option to disable hotspots underneath variant content?

I’ve been exploring using variants to have a collapsed pulldown/picker at the top of my interface click to expand a drawer with buttons inside of it (like an app drawer). Something I’m experiencing is that even when this picker component is placed at the topmost layer of my parent screen, when I click the component and it changes variant state from collapsed to expanded (which effectively obscures the rest of the parent screen with full-screen art, including an opaque background), not only do the hotspots within the variant work, but the hotspots for elements at the SCREEN level also work even with the contents of the top layer obscuring everything underneath.

It seems as though because the picker component in the top screen layer only has a small footprint in its default state, its larger variant states (with full background obscuring the main parent screen’s contents) are not blocking hotspots that sit on lower layers at the screen level.

Is there a way to change or define this behavior? For example, in proto.io, there is a checkbox to “propagate events in empty areas” of a component sitting above other hotspots, so it’s more flexible with transparent areas. At a minimum in this inverse case, I’d expect a top-layer component’s nested opaque shape layers to prevent clicking of hotspots on a lower layer of the parent screen.

I had issue with dropdown component (open/closed) using variants too. I think it’s not a viable way to do it, i think.

What I did to make it work:

  • Create a component with the dropdown AND the trigger button (the opened dropdown)

  • Create a component with ONLY the trigger, but inside a container as large as the opened dropdown.

  • Go in prototype and have the trigger “Open overlay” of the “opened version”. Set position to manual and it should be directly over the other (if they are the same width) or manually position it on top, if it’s not the same width.

Now Run the prototype, the dropdown will open, and when open, nothing else will work on the page until you close it.

Check the image attached, that should make it clearer.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.