Skip to main content
Question

Changing order of buttons


Hi!
I have 10 buttons and I want to change the order of them after clicking. Eg. the button from position 6th will be 1st after clicking. Is this possible?

8 replies

Josh
  • Former Community Manager
  • 1019 replies
  • October 2, 2023

@Iwona_Polanowska Are you able to share an example file or a screenshot/recording of what you’re looking to accomplish here?
Off the bat, I’m not sure if this is possible but would need some more info to explore more.


Hi!
This is an example:

figma


Josh
  • Former Community Manager
  • 1019 replies
  • October 2, 2023

Thanks for sharing the example! Unfortuntaly there’s not an easy way here to do this. The two options would be to create a component variant for each state or to create variables for the text label and state. Both of these would be quite complex though to maintain, especially if you ever add or remove buttons.


Thank you! I created a component variant for each state, but only for first 4. I did 65 variants 😅


Nate_G
  • Power Member
  • 180 replies
  • October 4, 2023

@Iwona_Polanowska I was able to get this to somewhat work using just variables/conditionals. It definitely gets complicated when you want to add in more interactions, but at least it re-orders correctly 🙂

View Prototype
View File


Wow! Impressive! Can you tell me how you did this? I cannot see a prototype setting in your file.


Nate_G
  • Power Member
  • 180 replies
  • October 6, 2023

I added some more info to the file to explain how it is set up. But it gets complicated, so I don’t think it will 100% solve your issue. 😦

The Figma file is set to “view only”, but you can “duplicate to your drafts” to run through it and see how it is set up in more detail.

→ Here is the link to run the prototype


Thank you!!!


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