Skip to main content
Question

Show something when at least 1 checkbox is checked

  • September 26, 2023
  • 1 reply
  • 734 views

Thommy_Westlund

I want to create a dynamic behaviour where if at least 1 checkbox in a group is checked, display some other content. I am fiddling with local variables and layer opacity, but I can’t seem to figure out how to get the more complicated version going. I am trying to avoid to make the group a component with it’s variants. Do you guys have any idea how to solve this?

Figma – 11 Sep 23
This topic has been closed for comments

1 reply

Gayani_S
Figmate
  • Community Support
  • 1982 replies
  • October 5, 2023

Hey @Thommy_Westlund, to tie a conditional to a checkbox state take the following steps:

  • Create variant set with different check box states
  • Set up change to interactions for those checkbox variants
  • Bind those variant instances to a variable that matches the variant name

When the variant changes state, the variable bound to it will also update its value to match the variant change during the interaction. You can then set a conditional to trigger an action when the variable hits a certain value, in this case, the value that the variant has changed to in the interaction.


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