Figma Support Forum

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

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?

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

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

Yes, exactly, that’s the whole point.

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?

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.