Designer News
Where the design community meets.
almost 7 years ago from Rasmus Andersson, Design at Figma
Thank you for an insightful comment.
Addressing some of your feedback, it sounds like we need to work on making constraints a little clearer and easier to use. By default, contents of a component has "scale" constraints which can be thought of as the constraint system maintaining a percentually-equal distance from all four edges. Say you have a component that's 100x100 in size, with a rectangle inside it that sits at position 20,20 and being 60x60 wide. Now, the effective "scale" constraints will be 20% top, 20% right, 20% bottom and 20% left. An instance of that component that is sized to 200x200 px will draw the rectangle with the same distances from its edges (20%, ...), which in this example equals 40 virtual pixels (aka screen points.)
For the button case, there's a fairly easy way for the author of the button to communicate margins — use constraints on the text label! For instance, if you want the text to always have a 20pt left margin and 10pt right margin, move the text box 20pt to the right of the edge of the component, and make it wide enough so it's 10pt away from the right edge of the component. Now, give the text box right & left, top & bottom constraints. When an instance is resized, the text will wrap to avoid drawing beyond the extremes of the text box, which means that all instances will have 20pt margin on the left and 10pt margin on the right.
Does that make sense?
I didn't realize there was an option for Top & Bottom
and Left & Right
in the Constraints dropdown! For some reason, I always assumed I was limited to a single side. That's awesome, thanks for the help :)
yeah, would be nice to access those from the little UI, not sure why it doesn't let you, unless I'm missing it.
Hold shift and you can select multiple :)
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Hey Rasmus, I just gave this a shot. Great work! Compared to Sketch Symbols, I really like:
Since Constraints go hand-in-hand with Components, I have some brief feedback:
And I echo everyone else, pricing!