Skip to main content
Question

Toggle layers inside a compoent with a boolean variable?

  • December 14, 2023
  • 3 replies
  • 755 views

Zlatko

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?

This topic has been closed for replies.

3 replies

Nate_G
  • Power Member
  • December 15, 2023

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

Get the File


Zlatko
  • Author
  • Active Member
  • December 15, 2023

Wow, this is really hellpful. 🙏 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.


Nate_G
  • Power Member
  • December 15, 2023

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