7.7 Flex Sizing (Child Behavior)
This topic provides information on Flex Sizing (Child Behavior).
CSS Equivalent:
flex: initial, flex: 1, align-self, width, height
Figma Concept:
Set via the Resizing settings on child elements inside an Auto Layout frame.
1. Hug Contents → flex: initial
CSS Equivalent:
flex: 0 1 auto – No grow, size to content
How to Set in Figma:
- Select the child element
- Identify parent’s main axis:
- Horizontal (→) = Main Axis: Horizontal
- Vertical (↓) = Main Axis: Vertical
- Set the child’s resizing for main axis to Hug Contents
Fill Container → flex: 1 (Grow)
CSS Equivalent:
flex: 1 1 0% or width: 100% depending on axis
2. How to Set in Figma:
- Main Axis Grow (e.g., make item fill remaining space):
- Set resizing to Fill Container along the main axis
- Cross Axis Stretch (e.g., full width/height):
- Set resizing to Fill Container along the cross axis
- Requires parent’s align-items to allow stretching
Result:
The child fills available space. Perfect for flexible layouts and shared columns.
Parent topic: Auto Layout to Flexbox Mapping
