Flex layout
Place a group's children in a row or a column, with even gaps, padding and alignment.
- Where
- Inspector, Layout section, Flex
- Makes
- A row or a column of the group's children
A Flex group places its children one after another, left to right in a row or top to bottom in a column. Whenever you add, remove, resize or reorder a child, the group places them all again. Use Flex for anything with an order and regular spacing, such as a card, a row of cards, a list, a header or a button with an icon. To line things up in columns and rows at the same time, use Grid instead.
Setting a group to Flex
Select a group with children and click Flex in the Layout section. Setto picks the direction, order and gaps from how the children are already arranged (see Changing the type). Then set the direction, gap and padding.
Top to bottom, or left to right. Changing it sets the size along the new direction to Auto, and the other size keeps its value.
Children that don’t fit continue on a new line. In a Row that’s a new row below, and in a Col a new column to the right. Wrap needs a fixed size along the direction.
The horizontal space between children. It’s disabled in a Col without Wrap, since there’s only one column.
The vertical space between children. It’s disabled in a Row without Wrap, since there’s only one row.
Where the children sit in the group’s box. The dots match positions on screen in either direction. The default is the left middle dot for a Row and the top center dot for a Col. Along the direction, alignment only makes a difference when the group is longer than its children. When Distribute isn’t Packed, the picker sets only the cross alignment, and a whole line of dots lights up.
How any free space along the direction is shared out. Both gap fields are disabled unless this is Packed.
- Packed keeps the children together, separated by the gap and placed by Alignment.
- Space between puts the first child at the start and the last at the end, with equal space between them.
- Space around puts equal space on both sides of each child, so the ends get half as much.
- Space evenly puts equal space between the children and at both ends.
The space between the group’s edges and its children. You set horizontal and vertical padding, or all four sides with Edit each side (Link all sides goes back to two). If the padding is larger than a fixed size allows, it’s reduced in proportion so the box keeps its size.


The size of a Flex group
The group’s Width and Height, in its Object section, can be Auto, px or %.
| Size | Behavior |
|---|---|
| Auto | The size of the children plus the gaps and padding. The group grows and shrinks with its content. |
| px | A fixed size. See Wrap. |
| % | A percentage of the group’s container. |
For a row with a fixed width, set Width back to px after switching to Flex, which sets it to Auto.
Children of a Flex group
Each child has an In layout section. With several children selected, it edits all of them, even if they’re in different groups.
- Fixed uses the value in the Width field. Switching to Fixed keeps the current width on screen.
- Auto takes the width from the content. Text is as wide as its longest line, and a nested Flex group is as wide as its children.
- 100% in a Row shares the free space equally among all the 100% children. In a Col, it’s the group’s width minus the padding.
The same three modes. In a Col, the free space is shared among the 100% children. In a Row, 100% is the group’s height minus the padding.
Overrides the group’s cross alignment for this child. The choices are Top, Center and Bottom in a Row, and Left, Center and Right in a Col. If the selection includes children of both a Row and a Col, they read Start, Center and End. The dash follows the group. It’s disabled when the child is 100% across.
Takes the child out of the layout at its current position and size, and disables the other controls here. Turn it off again and the child goes back to its place in the order.
The arrow keys along the direction move a selected child one place in the order: ← → in a Row, and ↑ ↓ in a Col. They skip children that are Freely positioned, and the other two arrows do nothing. In the Layers panel, the first child is the group’s lowest row.
- Flex row: drag to reorder
Wrap
With Wrap on and a fixed size along the direction, children fill one line and then continue on the next. In a Row, Column gap spaces the children within a line and Row gap spaces the lines. In a Col it’s the other way around. Distribute applies to each line separately.
Examples
On a blank scene, group a headline and a paragraph. Set the group to Flex and Col, with Row gap 12, Padding 24, a fill and Width 480 px. In In layout, set both text layers to Width 100% and Height Auto. Now edit the paragraph. The card’s height follows the text, and the padding stays at 24 px.
- Flex card: grows with its text
On a blank scene, group four product cards as a Flex Row with Column gap 24 and Width 1600 px, and set the cards to Width 100%. Delete one, and the other three widen to fill the row. Duplicate one, and all five get narrower.
- Delete: the other three widen
- Duplicate: all five narrow
Combining with other features
- Shared child behavior. What every layout child has in common (disabled X and Y, drag to reorder, Freely positioned, text, rotated children and the Scale tool) is covered on Groups and layout.
- Nested rows. In a Col that holds a title and a Row of cards, set the Row group’s Width to 100% in its In layout section so it spans the column.
Limits
- Each group has one direction. For rows and columns at once, use Grid or nest Flex groups.
- A gap can’t be negative. To overlap children, make one of them Freely positioned.
- You can’t set the spacing between one particular pair of children. Add an inner group, or use Distribute.