Skip to main content

Hey guys, hope you're doing well.

I am struggling to understand how this part of Figma works a bit so let me ask you a question.

I hope I can explain it well:

So basically you see the bottom element is icon and text. I want to be able to toggle between the different sizes I want to be able to toggle the icon next to the text to be big, middle or small as on the second row. I want with every size to be able to choose different color, for example I choose the small circle with the text I wanna see how it looks like with red, after with green and after with blue. And same for the middle and the big sizes. I guess the sizes must be component with 3 variables, and the colors should be instance swaps? I am lost please help and explain step by step so I can understand. Thank you in advance! :)
(I know it would be easier if they were really just colors, but they are different elements I just used colors for the sake of my question to understand the functionality)

I think you’re talking about properties of a component and how that works.

In your example, you need to determine the props and from the looks of it the props are only:

  1. Icon size
  2. Icon color

So what you need to do is create properties of that component, then map it on each variants like this:

x axis = size props
y axis = color props

 


Reply