Skip to main content
Solved

How to change parent variant on checkbox/switch?

  • November 22, 2024
  • 1 reply
  • 29 views

Onkel_Tem

Hi folks!

I cannot find a way to switch variant on checkbox/switch change.

Any ideas?

Best answer by Onkel_Tem

Answering to myself.

I managed to do this via Variables.

  • make both variant switching prop and the checkbox switcher prop of the bool type
  • create a so called “LocalVariable” of the type bool too
  • connect the instance variant prop and checkbox switcher prop to the created local variable

Details are in this video that I recorded today:

Figma: switch variant from child checkbox/switch | Переключение варианта внутренним чекбоксом|Figma: switch variant from child checkbox/switch | Переключение варианта внутренним чекбоксом
View original
This topic has been closed for replies.

1 reply

Onkel_Tem
  • Author
  • 18 replies
  • Answer
  • November 23, 2024

Answering to myself.

I managed to do this via Variables.

  • make both variant switching prop and the checkbox switcher prop of the bool type
  • create a so called “LocalVariable” of the type bool too
  • connect the instance variant prop and checkbox switcher prop to the created local variable

Details are in this video that I recorded today:

Figma: switch variant from child checkbox/switch | Переключение варианта внутренним чекбоксом|Figma: switch variant from child checkbox/switch | Переключение варианта внутренним чекбоксом

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