Skip to main content
Solved

I can't seem to make my component responsive regardless of its width

  • June 19, 2023
  • 1 reply
  • 966 views

I am creating a style guide for my team and designing all the components they need. In the video (https://vimeo.com/837458325?share=copy) you will see the design of a dropdown field. I have added a text layer to the left with constraints Left for Horizontal and Top and Bottom for Vertical. I have also added another text layer to the right which will be my dropdown icon. I am using the FontAwesome Pro Library for this. The constraints for this are Right for Horizontal and Top and Bottom for Vertical. The rectangle around these layers has constraints of Left and Right for Horizontal and Top and Bottom for Vertical. There is an 18px padding inside. I want to turn this into a component which I can then adjust the width of if I need to without the layout changing. How do I do this? It is not responsive. Am I doing something wrong?

Best answer by IraX

I would approach this differently. Just use “Frame 1” as the auto layout container, with “Spacing mode” set to “Space between”, then the label and icon will hug the edges.

You can also delete “Rectangle 1” and apply the stroke to the existing parent frame (“Frame 1”).

You alternatively could not even use auto layout and set the label’s constraints to “Left” and the icon’s to “Right”. Then “Center” for vertical positioning.

View original
This topic has been closed for replies.

1 reply

IraX
  • Active Member
  • 145 replies
  • Answer
  • June 19, 2023

I would approach this differently. Just use “Frame 1” as the auto layout container, with “Spacing mode” set to “Space between”, then the label and icon will hug the edges.

You can also delete “Rectangle 1” and apply the stroke to the existing parent frame (“Frame 1”).

You alternatively could not even use auto layout and set the label’s constraints to “Left” and the icon’s to “Right”. Then “Center” for vertical positioning.


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