split
Divide a region into named cells for comic panels, dashboard tiles, poster columns, or table grids, returning cell IDs and coordinates for use as layout targets.
Instructions
Divide a region into named cells — comic panels, dashboard tiles, poster columns, table grids —
without computing any positions. region: "page", an element id (its measured box) or [x, y, w, h];
margin insets it (one number, [vertical, horizontal] or [top, right, bottom, left]).
rows: one entry per row, either a number of equal columns or a list of column ratios, e.g.
[[2, 1], [1, 1], [1, 2]]; heights: row ratios (default equal); gutter: space between cells
(number or [horizontal, vertical]).
Creates one rect per cell, -1, -2, ... row by row, in layer — invisible unless style
gives e.g. {"fill": "#fff", "stroke": "#000", "stroke_width": 0.6, "rx": 2}. Use the ids as targets:
clip ("clip": "cell-5"), align/layout ("to": "cell-2"), place, fit, connect. An element region is its
measured box (stroke included).
Tables: split the header strip into columns (e.g. rows [[3, 1, 1]]), then repeat the data rows with
step [0, row pitch] and texts at the returned column edges (numbers: text_anchor end at the right edge).
Returns the cells [x, y, w, h] and their ids per row.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| layer | No | Cells | |
| style | No | ||
| doc_id | No | ||
| gutter | No | ||
| margin | No | ||
| region | No | page | |
| heights | No | ||
| preview | No | ||
| id_prefix | No | cell |