Skip to main content
Solved

Toggle Switch


Hi good Afternoon, I just learned how to create a toggle switch for my design that came out really great but I ran into an issue. I want multiple switches on one page but how do I make the switches that are “OFF” stay off or disabled when I turn one of the switches “ON” once selected?

I don’t want multiple toggle switches to be selected at the same time. once you select one the other ones can’t be selected unless you unselected the one that is “ON”. Can anyone help me with any suggestions or advice?

Best answer by Avokadomos

You can do it with variables that were just released if you want more control (requires paid plan). Otherwise, here’s a method using only component variants:

View original
This topic has been closed for comments

13 replies

Avokadomos
  • New Member
  • 373 replies
  • Answer
  • July 6, 2023

You can do it with variables that were just released if you want more control (requires paid plan). Otherwise, here’s a method using only component variants:


Thank you for your response and I do have a follow up question.


How am I able to do it with this kind of switch?


Avokadomos
  • New Member
  • 373 replies
  • July 6, 2023

That’s just a matter of switch design. The possibilities are endless, and animating is easy with smart animate. This example is using the exact same logic:


Wow I need to know how you did that?


Avokadomos
  • New Member
  • 373 replies
  • July 6, 2023

You can open up the presentation that I posted and inspect the file.


I’m not seeing where I can inspect the file. I clicked the project but I don’t see that option. I apologize if I am asking such basic questions. I still have a lot to learn.


I think I found it


I still can’t figure this thing out lol


Avokadomos
  • New Member
  • 373 replies
  • July 6, 2023

Where are you getting stuck?


On how to set the variable that selects and deselects each switch.


Avokadomos
  • New Member
  • 373 replies
  • July 6, 2023

If you’re doing my method you don’t need variables. Just a component with as many variants as you have switches. Then add change to interactions between them like I’ve done. Inspect the file to see how the connections are made. What you’re seeing in the actual view is the component instance.

image


Pixel_Mozart

i’m shocked that there isn’t a much easier way of doing this with the variables or booleans. what if i have 20 items?


ksn
Figmate
  • Community Support
  • 1579 replies
  • May 6, 2024

Hey @Pixel_Mozart - could you please create a new topic with your comments on this? ^ Since this thread is old/outdated, it would be much better to have a fresh start.

Would love to hear more about what the pain points are for you, and how you’d ideally like things to work. I’ll be closing this topic out, but again, please feel free to create a new topic with comments on this or any other feedback you have.


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