But linking this rectangle with the below component doesnāt work at all.
I would love to be able to switch the state of the linked object when I click this (example) rectangle in prototyping.
The linked object has different properties available, but I canāt select them tho.
Could you please explain my what I am doing wrong?
Iāve only found really laborious hacks to do such things. I really think there should be a feature around this.
One possible way for the Figma team to explore is in the IX menu details for a āclickā action, where āchange stateā is not assumed to be change of the element that is selected for this interaction, but a āremoteā element somewhere else on that page. This way a click of one object can be tied to a state change of another object.
This would massively enable new IX patterns without āInvisionā style hacks all over my prototype to mock separate screen states that have the differences illustrated. Currently I have use the ānavigate toā with a separate screen setup with that desired state. While this workaround hack somewhat works, it means many many copies of screens to manage the various states, and it quickly blows up if you have multiple states to manage in your flows.
It is also tied into a limitation that only 1x of each IX can be used. A āclickā should be possible to trigger multiple things, imho.
For all the cool ātricksā that Figma offers, being able to affect the parent state/layer property from a child would truly change the game. It would enable accordion/windowshade components (click on header to hide/show content below).
This is such a huge problem for me right now. I have had to make many many duplicates of pages to show how the dependencies of a button being clicked play out. I also agree with having more than one event being mappable to an action. This would reduce my workload by a solid 40% if I could just set some really basic dependencies.
Following the discussion here, This feature is a must-have.
being able to change 1 componentās properties from a different component is a basic thing, we need to be able to change the global state or something like that to achieve this.
I hear you, I ran into this issue too, itās definitely a pain point. The only way to get around this at the moment is to use a global variable.
Any element on the canvas can change the value of a global variable, and this variable in turn can be used to control the state of any other element (no parent-child connection is necessary between the elements). Iām not sure if I can explain it very well, but hereās a good demo from Figma on how you can achieve this: Figma tutorial: Prototype with variables - YouTube .
Consider how the global āhasCartā variable is used in the demo to connect the āAdd to cartā and the āBasketā buttons to each other, even though they are completely unrelated components. In the same way, you could set an interaction on your dropdown component (_Struktur-Mehr Anā¦) to set a global variable, and link the value of that variable to the visibility of the variants in your form component (Kundeneingabe-Felder-Layout-Variaten).
This is 100% possible. As Andreea said above, you can use a boolean global variable to toggle visibility of other elements. BUT you can also use a string global variable to set the component properties of another variable.
In short, use a global variable with a boolean value to manage visibility and use a global variable with a string value to set component properties.
Toggling visibility:
Create a new boolean variable named notificationVisible and set itās default value to false
For a button component, create an on-click interaction that sets the notificationVisible variable true.
Set the visibility of the notification component to mirror the value of the notificationVisible boolean variable
Using the interaction of one component to set the component properties of another:
Create a button to act as our controller.
Create a component with 2 variants, in this example the component we want to control is called status and has a property called color and two variants, red and green.
Create a global string variable called status and set it to our default component property value (āgreenā)
On button click, set the status variable to a string value of āredā
In the instance of the component value where you can select properties to switch to different variants, set that property to be driven be the string value stored in the status variable.
So long as the string stored in the variable is the same name (case sensitive) as a real value from the component property, things will work and you will be able to use the interactions of one component to drive the state of another component.
Thank you so much! I had actually set something like this up but I was worried I was wasting my time and I could not find any good information on it. This was extremely helpful for me. Thanks again!
Hi, I donāt know if itās because I have a different version of Figma as you @IanCox but I have created my component with 2 variants (View and Edit), a global variable Status set to View and I have a button with on-click interaction to set the variable Status to Edit. But impossible to set the property in my component to be driven by the string Status. In my component property I can only create Variant, Boolean, Instance swap and Text, and none of them have the option to be driven by another value (variable in this case). Could you tell me if I missed a step. Thanks.
Itās really stupid, the property is declared and you canāt use it, it will be very very very useful, it would reduce a lot of screens,
I am trying to make a tab component, I have created a symbol with all the properties I need, which are the different sections of the tabs content
1 I donāt want to repeat buttons in each tab.
2 I think it would be common sense when touching a button external to the symbol to change the property of the symbol.
The truth is I donāt really understand why it doesnāt work like that, please god of the Figma, I have a delivery on Friday, fix it