layout
Arrange SVG items in rows, columns, or grids with gaps and alignment, so elements form measured layouts without manual coordinate math.
Instructions
Arrange items in a row, column or grid with a gap — no coordinate maths needed.
An item is an id or a list of ids that move together, e.g. ["box1", "box1_label"], or
{"ids": [...], "anchor": "fig1-border"} to arrange by that member's box (plot frames line up even when
their tick labels differ in width); the rest moves along.
gap is a number or [horizontal, vertical]. align places items on the cross axis (grid: within cells).
The block stays where the first item is, or its top-left goes to at [x, y], or it is aligned to
to ('page' or an element id) using horizontal/vertical/margin. Connectors follow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ||
| to | No | ||
| gap | No | ||
| align | No | center | |
| items | Yes | ||
| doc_id | No | ||
| margin | No | ||
| columns | No | ||
| preview | No | ||
| vertical | No | ||
| direction | No | row | |
| horizontal | No |