0
0
Figmabi_tool~10 mins

Resizing rules (hug, fill, fixed) in Figma - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This data shows three UI elements with their parent container width, their original width, the resizing rule applied, and the resulting width after applying the rule.

CellValue
A1Element
B1Parent Width
C1Element Width
D1Resizing Rule
E1Resulting Width
A2Button
B2300
C2100
D2Fixed
E2
A3Text Box
B3300
C3150
D3Hug
E3
A4Image
B4300
C4200
D4Fill
E4
Formula Trace
IF(D2="Fixed", C2, IF(D2="Hug", C2, IF(D2="Fill", B2, C2)))
Step 1: D2 = "Fixed"
Step 2: IF(TRUE, C2, ...)
Step 3: D3 = "Hug"
Step 4: IF(TRUE, C3, ...)
Step 5: D4 = "Fill"
Step 6: IF(TRUE, B4, ...)
Cell Reference Map
    A       B       C       D       E
1 |Element|Parent W|Elem W |Rule   |Result
2 |Button |  300   |  100  |Fixed  |  ?  
3 |Text Box|  300   |  150  |Hug    |  ?  
4 |Image  |  300   |  200  |Fill   |  ?  
Cells B2, C2, D2 are used to calculate the resulting width for the Button. Similarly, B3, C3, D3 for Text Box, and B4, C4, D4 for Image.
Result
    A       B       C       D       E
1 |Element|Parent W|Elem W |Rule   |Result
2 |Button |  300   |  100  |Fixed  | 100 
3 |Text Box|  300   |  150  |Hug    | 150 
4 |Image  |  300   |  200  |Fill   | 300 
The resulting widths show that Fixed keeps the original width, Hug keeps the element's own width, and Fill stretches the element to the parent's width.
Sheet Trace Quiz - 3 Questions
Test your understanding
What width does the Button have after applying the Fixed resizing rule?
A100
B300
C150
D200
Key Result
IF resizing rule is Fixed, keep element width; if Hug, keep element width; if Fill, use parent width.