Skip to main content
Solved

Textvariant not setting correctly with variable on switch


Martijn_Benschop

Hi guys,

i have an ON/OFF switch. When clicked it should change a text (connected to a variable) to ON or OFF and the button itself must change its variant accoringly. What ends up happening is that the text does switch from ON → OFF when i click (GOOD). But the text will not change back to ON again when the switch is in its OFF-variant (NEEDS FIXING) and is clicked.
The text does change from OFF-> ON again when the switch is in it’s ON-state, but i end up with an OFF switch with ON-text.

I have made a video to show what i mean:
Video

Here is the component and its interactions (the switch state-off which should set the variable to ON):

I have made multiple iterations, also with conditional interactions, but i end up with the same problem. It’s getting frustrating to fix. Does someone have a solution for this?

Best answer by Martijn_Benschop

I solved it by setting the variant directly to true in this way:

image

I guess it’s sometimes better to type what you want than to click on the Figma UI.

View original
This topic has been closed for comments

2 replies

Martijn_Benschop

Here is the switch in state ON:


Martijn_Benschop

I solved it by setting the variant directly to true in this way:

image

I guess it’s sometimes better to type what you want than to click on the Figma UI.


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