Containers & Auto-layout
Containers are the beating heart of Portals — the single feature that turns a frozen drawing into a living, editable design. Everything the AI generates is built on them, and once you feel how they behave, you’ll never draw a static layout again.The idea
A container is a box that lays out its children for you. Drop shapes and text inside it, and instead of each element sitting wherever you dragged it, they arrange themselves according to rules: flow in a row or column, wrap or not, align to an edge or the center, keep a gap between items, respect padding on the inside. The magic is what happens next: resize the container and its children reflow. Pull it wider and a row of buttons spreads out; make it narrower and wrapped items drop to the next line; add text and the whole stack breathes to fit. The design doesn’t break — it adapts. That’s why generated designs survive being edited: they were built, not drawn.Anatomy of a container
A container is made of the same parts, and we’ll meet each one in the Properties panel when you select it:- Flow (Direction) —
Rowlays children side by side along the main axis;Columnstacks them top to bottom. This one decision shapes the whole layout. - Wrap —
No wrapkeeps everything on one line (they’ll squash rather than break);Wraplets items flow onto the next line when they run out of room. - Align — where children sit on the cross axis: start, center, or end. The little alignment grid in the panel is the fastest way to feel it — click a corner and watch the children jump.
- Distribute — how children spread along the main axis:
Betweenpushes the first and last to the edges with equal gaps between,Aroundgives each item equal space on both sides,Evenlyspaces everything identically. - Gap — the breathing room between children, in pixels.
- Padding — the breathing room inside the container, between its edge and the first row of children.
Hands-on: the first container
- Grab the Container tool from the top-center toolbar (the two-column icon — the same icon the layers panel uses for containers, so the object has one identity everywhere).
- Click and drag a box out on the canvas. That’s your container — it already has Flow, Gap, and Padding set to sensible defaults.
- Draw a couple of rectangles and some text, then drag them inside the container. Watch the layers panel: they nest underneath it.
- Select the container and open the Properties panel. Flick the Direction between Row and Column and watch the children re-flow instantly. Crank the Gap and feel the spacing change live.
- Now resize the container by dragging a corner. The children ride along — that’s auto-layout keeping your design honest.