Block
Stack
Stacks its contents one after another, top to bottom — the vertical counterpart to a row.
What it is for
A Stack is a vertical group of blocks that behaves as one unit for selecting and moving, and gives you control over what happens when the group reaches the bottom of a page. Use it to keep a signature and a name together, to give several blocks one border or fill, or to drop a set of blocks into a Row column as a single thing.
Choose something else when:
- you want blocks side by side — use a Row;
- you want the same design once per record from your data — use a Repeater;
- you only want one block glued to the one after it — turn on Keep with next on that block (below) instead of grouping.
Add and edit it
There is no Stack tile in the block palette. Most of the time you want one around blocks you already have — wrap them (below). To start with an empty one — on a blank page, in a header or footer, inside a Row column — search for "empty group" (or just "stack"): the Search button at the top of the block palette, or Search blocks… at the top of any + Add block menu. The new Stack lands where that search adds, empty and selected, ready for blocks. To fill it from the keyboard, press Shift+F10 and choose Add a block inside — the Stack's own "+ Add block" menu opens, ready for the next key.
Wrap blocks you already have. Select the blocks you want to group — click the first, then Shift-click the last, or drag a box around them — and choose Wrap in Stack on the bar that appears above the selection. For a single block, it is in that block's menu (⋮ on its block bar, or right-click; Shift+F10 opens the same menu from the keyboard). The new Stack takes the blocks' place and holds them in the same order, with their text, styling and fields untouched. It adds no spacing of its own — inside another Stack it uses that Stack's gap — and it is selected, so you can give it a border or move it straight away. Selecting a block together with the container it sits in counts as selecting just the container.
Edit inside it. Select the stack and notice it has its own move handle, separate from the pieces inside it. Click one of its children directly to select and edit just that piece. The breadcrumb trail at the top of the side panel names the whole path down to it — Row, then Stack, then the block itself — and the line above the trail says what an edit will actually reach, which matters once the stack sits inside a Row column or inside a Repeater. Open the stack's menu (⋮ on its block bar, or right-click) to move it into another container, duplicate it, or delete it. To add content, drag a block onto the stack on the canvas — an empty stack shows a dashed "Empty — drop a block here" band as a drop target.
Unwrap a Stack. Choose Unwrap Stack from the Stack's menu. The Stack goes away and its blocks stay where it was, in the same order, selected. The Stack's own settings go with it: gap, Split, background, border and inner spacing. Wrapping and unwrapping are each one step to undo.
When Wrap or Unwrap is greyed out. The entry stays in the menu (or on the bar) and hovering it says why. That happens when:
- the blocks are in different places — one on the page and one inside a Row column, say — or other blocks sit between them: select blocks from one place that are next to each other
- a block is anchored to an exact position on the page: Unanchor it first
- the blocks are inside a Ruled form box, or in a header or footer (not supported there yet)
- the selection includes a page break, which only works directly on the page
- the Stack is empty (delete it instead), or has a visibility condition — remove the condition first, so its contents do not start showing every time
To repeat the blocks once per record instead of grouping them, choose Repeat for each record… (next to the wrap buttons). It asks which list and what each record is called — see the Repeater article.
Settings
| Setting | What it does | Default and limits |
|---|---|---|
| Gap between items | The vertical space between the blocks stacked inside. A larger gap spreads them out and makes the stack taller. | 4 mm (shown in grey until you set one; Default takes it back). 0 or more. Point at the field and the page highlights exactly those gaps; the blocks' own margins are separate. |
| Split | What happens when the stack does not fit in the space left on the page. Allow page breaks between items lets a page break fall between two of the stack's items, so the stack fills the current page and continues on the next. Keep together keeps the whole stack together on one page. | Allow page breaks between items. |
Like every block, a Stack also has the Box section (margin, border, padding and fill — a Stack can be a framed panel), Visibility, and the Page position explanation; see the Spacing, size and what is in effect article.
Which Split to choose
- Allow page breaks between items (the default) suits long content you are happy to see continue overleaf. A break only falls between items, or inside a long paragraph where the text can divide.
- Keep together suits things that read as one unit — a signature block, a small-print notice. If the stack does not fit in the space left, the entire stack moves to the next page rather than breaking partway through. A kept-together stack taller than a whole page cannot be kept whole, so keep such stacks short.
Keep with next inside a stack
Select a block inside a stack (or a Row column, or a Ruled-form region) and you get a Keep with next toggle under Line and Page Breaks in the side panel. It glues that block to the one after it within the same stack, so a page break can never separate them. A stranded heading is already handled for you automatically — reach for this toggle for anything else you want glued to what follows it. It is the lighter alternative to Keep together when only two neighbours must stay together.
Placement and nesting
A stack always spans the full width available to it. To place things side by side, use a Row instead, or put the stack inside a Row column. Stacks can nest: a stack inside a Row column inside another stack is fine, and each level keeps its own gap and split settings. A stack inside a Ruled form region can hold anything except another Ruled form — and a stack that already holds a Ruled form cannot be moved into one.
Examples
Each example is a complete template stored with this documentation and checked automatically.
A signature that never loses its name
The example is stack-1: 52 short paragraphs ("Paragraph 1" … "Paragraph 52") that fill the first
page almost to the bottom, then a Stack, Keep together, gap 2 mm, holding three lines.
Sample data:
{ "signer": { "name": "Janis Ozols", "title": "Managing Director" } }
The Stack's lines are "Kind regards,", {{ $data.signer.name }} and {{ $data.signer.title }}.
Expected output: the first page ends with Paragraph 52, and "Kind regards," / "Janis Ozols" /
"Managing Director" sit together at the top of page 2. With the same content set to Split between
children, "Kind regards," and the name would stay at the foot of page 1 and "Managing Director" would
be left alone at the top of page 2.
A long section that may continue on the next page
The example is stack-2: 44 short paragraphs, then a Stack on the default Split between
children that holds four numbered paragraphs of terms, gap 3 mm. Expected output: the first
three terms fill the rest of page 1 and the fourth continues at the top of page 2 — the stack
divided between its items, not moved whole.
Wrapping what you already have
Select a heading and the paragraph under it, choose Wrap in Stack, and give the Stack a border in its Box section: the two now move, duplicate and drop into a Row column as one framed panel. This needs no template of its own — any blocks can be wrapped.
Output differences
- PDF and HTML: the stack is drawn exactly as laid out, including its fill, border and any page split.
- Word (DOCX): the stack's blocks follow one another as ordinary content, in order; a Stack with a fill or border is carried as a bordered, shaded one-cell table. Page splitting follows Word's own page flow, so check the Preview's "Output differences this template uses" list before you rely on an exact break.
Troubleshooting
- The stack split and left a line alone at the bottom of the page. It is set to Split between children. Choose Keep together in Split, or select the first block and turn on Keep with next.
- The stack jumped to the next page and left a large blank space. Keep together moves the whole stack when it does not fit. Choose Allow page breaks between items, or shorten the stack.
- There is more space between two blocks than the Gap says. Space adds up: the upper block's bottom margin, the stack's gap and the lower block's top margin. In effect in each block's Box section shows how the space between two blocks adds up.
- Wrap in Stack is greyed out. Hover it for the reason; the usual ones are listed above (blocks in different places, an anchored block, a header or footer, a page break).
- I cannot find a Stack in the palette. There is none; use the Search button and type "stack" or "empty group", or wrap blocks you already have.