In the 1st image i am changing the value of a boolean variable to true and in the second image i am using that boolean to change the variant in other component but when i add a instance of the component in the frame it shows warning and doesn’t work.
Can someone tell me how i should approach it?
Hi @Shivam_Saini1, Thanks for reaching out about this. I assume you see the title of this post is displayed as an error message on your screen.
I’m not sure how you set up the interaction, but if you use the “Change to” action to change variant in other component in the second image, you might get an error message.
You can only use “Change to” action to create interactive component switch between variants from the same component set. To learn more about the interactive components and “Change to” action, please refer to the resources listed below:
Additionally, I came across a related conversation within our community. I suggest you take a look at it as it may provide some valuable insight: Warning “this interaction must swap from a variant to another variant within the same component set
If the above information does not provide clarity, I recommend contacting our support team for assistance here: https://help.figma.com/hc/en-us/requests/new
When you contact our support team, please provide the following:
- Your Figma account’s email address.
- The direct link to the file and please add support-share@figma.com as an Editor to the file (don’t worry, this won’t impact your billing).
- A brief video recording that shows the issue. Please ensure the entire Figma window is visible, including the Properties and Layers Panel.
Your cooperation is greatly appreciated as it will aid our support team in further assistance.
Thank you,
What i was try to do was that I change from default to variant2 if a boolean variable was true.
I visited the related conversation before also but that didn’t help me out. However, now I have solved the switching by attaching a variable to property of Instance.
Thanks for your time.