Skip to main content
Question

Auto change component height if inner component icons height changes


https://www.figma.com/file/t8H1gm8J7zTyBpoYdZEEfw/Test-Component-Resize?type=design&node-id=0%3A1&mode=design&t=1GbbRnG3v9kKjTRM-1 This is my Figma reference, here I have two icons which are having same width but different height, in Auth Layout, I have kept the 0 vertical gap, I created a component which contain Icon and Text in vertical order. The text is not pushed up when changing the icon using the component property since the next icon height is less. Could someone please suggest some options here to fix this issue?

This topic has been closed for comments

2 replies

MartinBajac
  • New Member
  • 31 replies
  • October 25, 2023

Hey @Abhishek_Verma . In order for both frames to have the same height, I would suggest adding auto-layout to the icon and the text and setting the vertical layout to space-between. Make another auto-layout for the background, having the desired padding and setting align-center. Do the same for the other icon.


Thanks @MartinBajac for your reply, I converted the text to a component added the auto-layout to icon&text with vertical layout setting, and updated space-between to 0 for both. I am not sure how to use the background and what padding I can keep. Could you please guide me on how I can do that and merge with the icon+text component?


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