Skip to content

Frames and auto layout

A frame is the container that holds elements, clips them and runs auto layout. Press F to draw one, or ⌘F to frame your selection.

Should I use a frame or a group?

Use a frame when the container has a size or a layout of its own, and a group to move a few things as one.

CompareFrameGroup
SizeAny sizeAlways hugs its contents
Clip contentOn requestNo
Auto layoutYesNo
Drag elements in and out on the canvasYesNo, use the layers list
Make one⌘F⌘G, ungroup with ⌘⇧G

Give a group a fixed or fill size on either axis and Brilliant promotes it to a frame.

How do I add auto layout?

Select the elements and press ⇧A. A single frame converts in place; anything else gets wrapped in a new auto layout frame. Brilliant reads the gap and padding from where things already sit, so nothing jumps.

The Layout section: direction switch, alignment, spacing and padding
The Layout section in the right panel.
ControlWhat it sets
DirectionStack children horizontally or vertically.
GapThe space between children, a number or auto for space-between.
PaddingThe inset from the frame edge, per side.
AlignmentWhere children sit along the stack and across it.
WrapLets children flow to a new line when they run out of room.
Clip contentThe scissors button. Crops anything past the frame edge.
A still of the live example. Open this page on a desktop browser with WebGPU to try it.
Auto layout, live, in its opening state
Direction
Gap
Padding
Alignment
Auto layout, live. Live on a desktop browser with WebGPU. Flip a control and the canvas recompiles in place.

Try it: flip the direction, gap, padding and alignment of a real frame.

What do hug, fill and fixed mean?

They decide who sets the size on each axis: the contents, the parent, or you.

Three auto layout frames: a hug frame shrinks to fit its children, a fill child stretches into the leftover space, and a fixed frame keeps its size
Three auto layout frames: a hug frame shrinks to fit its children, a fill child stretches into the leftover space, and a fixed frame keeps its size

Children set to fill share the leftover space. Give one a higher grow factor and it takes a larger share.

How do I pin one child outside the flow?

Turn on Toggle Ignore Auto Layout for that child. It stays a child, but the frame stops counting it for spacing and sizing, and you can drag it anywhere.

What are layout grids for?

Layout grids are guides for lining work up: columns, rows or a square grid. Add one from the Layout guides section of the right panel and set its count, size, gutter and margin. They never export. Show or hide all of them with ⇧G.

How do masks work?

A mask clips a set of elements to the shape of the topmost one. Select two or more and press ⌘⌃M, or right-click and choose Use as Mask. Edit the shape or the content any time and the result follows.

Before and after a mask: a circle over gradient artwork, then the same circle clipping the artwork to its outline
Before and after a mask: a circle over gradient artwork, then the same circle clipping the artwork to its outline

Where next?