Be Extra Cautious When Changing Resizing Behavior on the Instances of Components

Cameron Burke
Figma Explorations
Published in
3 min readMay 25, 2022

Alright, for this quick Figma Exploration, I want to talk about designing components with the intention of changing the resizing behavior of their instances when they are used.

Recently, I was working on a pretty simple Menu Component. The component consisted of a larger Menu Component with some menu list item components inside of it. So, to make the menu component I needed to first make list items and some simple components for the list items.

Interestingly, since I created the menu list item components first and thus they were not yet inside the auto layout container that the Menu Component was going to be, they had to have either the “hug contents” or “fixed” property and not the “Fill Container” property I wanted them to have. “No problem”, I thought, my plan would be simple, set the property of the list item components to “fill container” once they were inside the larger Menu Component frame, and just include that property change in the component documentation.

Well, once I had configured the menu list item components, added them to the larger Menu Component and changed their properties to “fill container” I thought, “Great! I’m all set”. Now I had a responsive menu item!

However, this is where the issues arose. I had actually made a quick mistake with the initial menu list item size and needed it to be 44px instead of 40px. So no biggie right? Since the menu component is made up of the menu list item components I just need to change those and I’m all set. The answer was no. See the problem was because I had changed the resizing property of the menu list item components, the resizing link was broken and now the menu list item components won’t resize. Nice, my naivety has once again bit me in the ass.

My solution ultimately was to make the Menu component list items a fixed height and width to start as we deemed making a responsive Menu component wasn’t necessary. Of course there could be other solutions to the problem, such as if you wanted to keep the menu item responsive and set the “fill container” property to the list-items, then you would just need to be absolutely certain you had the height property correct and wouldn’t need to change it later. However, the important thing here is regardless of how you approach your own components, always be extra careful when implementing changes in resizing behavior as a part of your component designs, as it may break other functionalities that make components such a valuable tool.

Thank you for reading! If I made a mistake or you have found a better workflow please let me know! The whole point of these is to learn and I am always open to feedback. As painstaking as it always is, I hope my mistake here was your learning and that you go forth and use it with whatever it is you are working on🙏

My Design Inspiration Today: “Set” by Na Kim

--

--

Cameron Burke
Figma Explorations

I write through experience. Mostly questions. I love design. I love lots of other things too!