Choose a layout
Select a frame. In the Layout section of the properties panel, the Flow row has four options:
Choosing a layout changes the frame in place. Only frames have a layout; text and SVGs sit inside one.
Make a layer inline
Inline layers flow next to each other like words in a sentence, wrapping onto the next line when they run out of room. A layer can be inline when its parent uses Block.- Select a frame or text layer inside a Block frame.
- Click the inline button in the Layout section header (Make inline).
Add auto layout
Auto layout is Wonder’s name for Flex.- Press ⇧ A (Add auto layout) to add it.
- Press ⌥ ⇧ A (Remove auto layout) to set the frame back to Freeform.
- One frame without a layout, or with Block: the frame becomes Flex. Wonder picks a row or a column from where the children sit, and the frame hugs its content.
- Several layers, or a layer that isn’t a frame: Wonder wraps them in a new Flex frame and selects it. A single text layer gets a centered row with a 10 px gap, like a button.
- A frame that already has Flex or Grid, or an image with nothing inside it: Wonder wraps it in a new Flex frame.
Set up a Flex layout
With Flex chosen, the Layout section shows:- Flex Row or Flex Column: the direction the children line up in.
- Alignment: a 3 × 3 grid. Click a cell, such as Align top left, to place the children inside the frame.
- Space Evenly, Space Between and Space Around: spread the children out instead of using a fixed gap. Click the active one again to turn it off.
- Horizontal gap and Vertical gap: the space between children, from 0 to 999 px.
- The wrap button (Wrap items onto multiple lines): lets children move to a new line when they run out of room.
Set up a Grid layout
With Grid chosen:- Click the Grid button (it shows the size, such as 3 × 2) and pick how many columns and rows you want from the matrix. You can also type Number of columns and Number of rows. Set rows to Auto to add rows as the content needs them.
- Set Horizontal gap and Vertical gap. Hovering a gap field highlights those gaps on the canvas.
- Use Align items to place each child inside its cell, and Align grid to place the whole grid inside the frame when there’s room left over.
Size grid tracks
Open Grid settings to size each column and row. Under Columns and Rows, each track has a size and one of four modes:
Click + (Add column or Add row) to add a track, − to remove one, and drag a track to reorder it. A grid always has at least one column.
On the canvas, hover a column or row of a selected grid to show its badge. Click the size to type a new one, open the arrow for the modes, or drag the grip to move the track.
Place children in a grid
- Drag a child into a cell on the canvas. It only pushes aside the children it lands on.
- With Automatic positioning off, select a child and use the arrow keys to move it one cell at a time.
- Under Grid child, set Column span and Row span to make a child cover several cells.
Set up a Block layout
With Block chosen:- Spacing sets the vertical space between children.
- Alignment places children on the left, center or right using their margins. It doesn’t align inline text.
Set padding and margin
Padding is the space inside a Flex, Grid or Block frame, around its children. Margin is the space around a layer, outside it. By default you set Horizontal padding and Vertical padding. Click the All sides button to set Left padding, Top padding, Right padding and Bottom padding one by one, or ⌘-click a padding field to set All padding at once. Margin has the same pair and All sides views, and each margin side can also be Auto.Edit gaps and padding on the canvas
Hover a selected Flex or Block frame to show small handles in its padding and between its children.- Drag a padding handle to change that side. Hold ⌥ to change the opposite side too, or ⌥ ⇧ to change all four. Hold ⇧ alone to move in bigger steps.
- Drag a gap handle to change the gap. In Flex, every gap changes together; in Block, only that one does.
- Click a handle to type an exact value.
Coming from Figma
Designs you import from Figma come in with these layouts already applied.
If something goes wrong
- I can’t see the Flow options. Only frames have a layout. Select the frame, not a layer inside it.
- The inline button is greyed out. Hover it to see why: the parent must use Block, the layer must follow the layout, and a selection can’t mix inline and non-inline layers.
- ⇧A made a Grid, not a Flex. The layers were already arranged in a grid. Choose Flex in the Flow row to change it.
- I can’t see the gap and padding handles. Select a single Flex or Block frame, hover it, and zoom in until it’s at least 48 px on screen.