Toggle layers inside a compoent with a boolean variable?

I have a component that has two layers on top of each other. Is it possible to turn one on, while the other is turned off (and vice versa) with a boolean variable?

To top it off, can I have multiple instances of that component inside a frame, and change the variable mode so all layers‘ visibility can be controlled through that main frame?

@zlat Here is a quick example of one way to set up something like that using boolean variables + modes.

Get the File

Wow, this is really hellpful. :pray: It confirms what I was trying to do it myself this morning.

I‘m working on a floor plan framework in Figma, and these switches are a game-changer to produce furniture in different styles with showing on/off different layers.

1 Like

@zlat That’s a fun idea, best of luck on that project!