Craftpath › FigCraft course › Level 1 · Your first design
Level 1 · Your first design · about 12 minutes · free
Auto layout: designs that resize themselves Auto layout stacks layers in a row or column with fixed gaps and padding. Add text and the card grows. It's how real interfaces are built, and how developers build them too.
Start the interactive lesson: narrated demo, steps and quiz →
What you’ll learn Add auto layout to a selection Set direction, gap and padding Nest layouts and let text hug its height
Step by step Select Name and Subtitle (Shift-click on the canvas). Press ⇧A , or ⌘K and type add auto layout . In Auto layout, choose vertical and set the gap to 4 . Rename the frame Text . Shift-click Avatar together with Text and add auto layout again. Set it to a row , gap 16 , align centre . Rename it Header row . Select Header row and Bio and add auto layout: vertical , gap 16 , padding 24 all round. Rename it Profile card . Select the old Card rectangle and press ⌥⌘C (copy properties). Select Profile card and press ⌥⌘V : white, radius 16 and the shadow. Delete the old Card rectangle. Move Profile card to X 24, Y 64 and set its width to Fixed 345 . Select Bio and set its width to Fill container and height to Hug contents . Add a sentence to the bio. The card grows; padding stays 24. Save.
Tips Columns inside rows inside columns. Every complex screen is nested auto layouts. Think in boxes before you think in pixels.Gap and padding are design decisions. Pick from your spacing scale (4, 8, 16, 24). Never ‘whatever it guessed’.Hug, Fill, Fixed. Hug fits the content, Fill takes the space the parent offers, Fixed never changes. Most bugs are the wrong one of the three.Make it tappable. Buttons need a tap area of at least 44 pt (iOS) or 48 dp (Android). Padding counts: a 24 px icon with 10 px padding all round is 44.
Check yourself The card doesn't grow when you add text. What do you check? That the text and every parent frame are set to Hug contents for height, not Fixed.
FigCraft is an open-source project by its own authors. Craftpath is an independent, free learning resource.