Skip to main content
Solved

How to Link a Dropdown Menu to Another Component in Figma? Quest


Amichai_Oron

I am working on a Figma prototype where selecting an option from a dropdown menu (options 2, 4, 6, 8) not only updates the menu’s display but also changes another component on the same screen. Specifically, I want the selection to dynamically adjust the number of squares displayed in another component. How can I achieve this interconnected behavior within a single screen without creating separate outcome screens for each dropdown option?

Best answer by Vishal_Ramawat

So the component has 3 Variants with Property1 set to 2/4/8

And then on instance you link the DD variable to it’s property

You can create an ‘Empty’ Variant in Squares component with Property 1 as “Select”, so when DD value is Select, you can show an empty container.

View original
This topic has been closed for replies.

10 replies

Vishal_Ramawat

You can try using the variables with components.
So each option in dropdown will set the variable to needed value: 2,4,6,8
Use this variable to match the States/Variants of the component which contains the squares and also the menu.
The Variant name for both menu and square components can be same: 2,4,6,8.

So if you select option ‘4’, you set the variable to 4. This will change the variant to 4 for Menu and square instances.


Amichai_Oron
  • Author
  • New Participant
  • 11 replies
  • May 12, 2024

not sure i understand here is what i did

  1. i created a dropdown button , pressing it will open a drop down overlay 2,4,6 and you can select the number for instance if you select 2 it will change the variable to 2 and update the dropdown button , but my goal is to also change another component that has 4 variants to state 2 , for instance the component called squares has ( 2,4,6) squares and will change to 2 squares when pressed.

I am currently doing this with multiple screens but i want to control the change of screens via the dropdown and the component variable - this is not working because i cant figure out how to make the 2,4,6 screens change as a result of the change of the variable .


Vishal_Ramawat

The variants if Squares component, should have the state name as 2,4,6.
So when you set DD variable to 4, DD changes to 4 and the State ‘4’ variant is selected.
Can you elaborate more on ‘change of screens’?


Amichai_Oron
  • Author
  • New Participant
  • 11 replies
  • May 12, 2024

as you can see the white screens change base on the selection what cant do is select the screens component( squares = 2 whitescreens)


Amichai_Oron
  • Author
  • New Participant
  • 11 replies
  • May 12, 2024

in my design the white squares are in a separate component from the drop down component.


Amichai_Oron
  • Author
  • New Participant
  • 11 replies
  • May 12, 2024

what i need is if variable squares changes to 4 then change component [ square ] variant to 4


Vishal_Ramawat

Did you link the variant names to the DD variable?


Vishal_Ramawat

So the component has 3 Variants with Property1 set to 2/4/8

And then on instance you link the DD variable to it’s property

You can create an ‘Empty’ Variant in Squares component with Property 1 as “Select”, so when DD value is Select, you can show an empty container.


Amichai_Oron
  • Author
  • New Participant
  • 11 replies
  • May 13, 2024

Yes! that was the missing piece! thank you very much Vishal


Vishal_Ramawat

Glad, I could help!


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