TypstDocumentation

stackShowable
Question mark

Arrange content and spacing horizontally or vertically.

The stack places a list of items along an axis, with optional spacing between each item.

Example

#stack(
  dir: ttb,
  rect(width: 40pt),
  rect(width: 120pt),
  rect(width: 90pt),
)
Preview

Parameters
Question mark

items
relative lengthfractioncontentPositional
Question mark
Variadic
Question mark

The items to stack along an axis.

dir

The direction along which the items are stacked. Possible values are:

spacing

Spacing to insert between items where no explicit spacing was provided.