In my main file im pulling a external style sheet which controls light/dark mode which all works fine. Im also pulling in graphics (logos, illustrations etc) from a different library. This library has component with 2 instances of the same illustration (light and dark).
What I want to do is from my main file toggle a variable which swaps all the graphic instances? Is this possible?
You can apply a text variable to the instance’s variant property, and then set the text variable to any variant name.
How do you apply a variable to an instance variant property?
On the instance, click on assign variable (only visible when you hover the section).
No worries! Remember to mark this topic as resolved.
Before I close this, any way to apply the instant variant property to an instance that is within another component? Seems like not possible?
That is correct. Variables can’t be used in nested components, at least yet.