Skip to main content
Answer

How to change parent variant on checkbox/switch?

  • November 22, 2024
  • 1 reply
  • 38 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 | Переключение варианта внутренним чекбоксом
This topic has been closed for replies.

1 reply

Onkel_Tem
  • Author
  • 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 | Переключение варианта внутренним чекбоксом