Skip to main content
Solved

Is it possible to change a component when a certain condition is fulfilled?


Raph

As I’m prototyping, I would like to achieve is the following.

If component 1 is in state A and component 2 is in state B, then component 3 automatically changes to state X. And if component 1 is in state B and component 2 is in state A, then component 3 automatically changes to state Y.

Is that possible?

Best answer by Gleb

No, this isn’t possible, unless you combine all these components into one element and change its state.

View original
This topic has been closed for comments

12 replies

Gleb
  • Power Member
  • 4706 replies
  • Answer
  • March 7, 2021

No, this isn’t possible, unless you combine all these components into one element and change its state.


Raph
  • Author
  • 7 replies
  • March 7, 2021

Thanks @Gleb. But is there a way of changing that component’s state based on certain interactions? The point is to use in prototypes.


Gleb
  • Power Member
  • 4706 replies
  • March 7, 2021

Yes, exactly, that’s the whole point.


Raph
  • Author
  • 7 replies
  • March 7, 2021

So how would I do? How can I make interacting with a nested component change the state of the larger component it’s a part of?


Gleb
  • Power Member
  • 4706 replies
  • March 7, 2021

The same way you would change the state of any other regular element: using overlays or the new interactive components beta if you have access to it already.


Emmanuel_Cuevas

What happens with certain animations that can’t be used overlays, cause I’m using an overlay. For example, I have a dropdown that shows certain tags. I click the open button as an overlay and I swap that overlay to deselect some elements from the list, but I’m still seeing those tags in the dropdown list header. I can’t use an overlay for that. Am I?


  • 1 reply
  • July 6, 2023

is this possible with the current Figma Config updates > variables ?


I’m interested by this too, as @Vipin3 asked, is it possible now with the last Figma config update ? I tried with variable but don’t achieve what I wanted.
Basically, I have a side menu and I would like it to open when I click on a button which is not in the component of the side menu.


tank666
  • 4862 replies
  • July 26, 2023

  • 1 reply
  • September 28, 2023

Hi, I have a list component where per item is a component with 2 states (Selected, Unselected).
Current: When i select the item in the list, the state is correct but when I select the rest of the items, all item state become selected.

Ideal: When i select another item on the list, the previous selected item change state from “Selected” to "Unselected.

how can I create the interaction where if 1 item is selected, the rest of the list change to unselected?


This is exactly what im trying to do. Did you find a solution?


Gayani_S
Figmate
  • Community Support
  • 1957 replies
  • March 18, 2024

Hey @Jose_Diaz, thank you for reaching out! Could you confirm if you want to create radio buttons to select one single choice?

If this is your request I’ve found the following YouTube tutorial which is explaining how to create these step by step:

If not please give me further information on what you’re trying to achieve. I am happy to help out further!

Thanks,

Gayani


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