Skip to main content
Question

Toggle layers inside a compoent with a boolean variable?

  • December 14, 2023
  • 3 replies
  • 554 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?

Nate_G
  • New Participant
  • 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
  • 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
  • New Participant
  • December 15, 2023

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


Reply


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