Grid layout
The grid layout packs nodes into rows and columns. It's the engine behind the block diagram (block / block-beta), where the whole point is a tabular arrangement rather than an edge-driven graph.
How it works
You declare a column count and drop items into the grid; kymo flows them left-to-right, wrapping to the next row, and sizes every column to the widest cell it holds:
columns Nsets the row width.- A bare id is one cell;
id["label"]sets its text and shape. id:Nmakes a cell spanNcolumns.space(optionallyspace:N) leaves a gap.block:id…endnests a sub-grid that occupies one column of its parent, with the column unit widened to fit it.- Edges (
A --> B,A --o B,A --x B) connect cells, clipped to their borders with the matching arrow / circle / cross end.
text
block-beta
columns 3
a["Ingest"] b["Transform"] c["Load"]
space:3
db[("Warehouse")]:3
a --> b --> c --> dbSteering it
- Change
columnsto reflow the whole board. - Use spans (
id:N) andspaceto align cells across rows. - Nest
block:…endfor grouped sub-grids.
Trade-offs
- Best for dashboards, matrix/board layouts, anything inherently tabular.
- Not for free-form graphs — there's no crossing minimisation; placement follows the grid you declare. For edge-driven graphs use Dagre.
→ Related: Block Diagram.