Any .json file not named form.json, project.json, autocomplete.json, or presets.json uses this format - filename is otherwise arbitrary, referenced from process.js via overlay(filename). overlay.json specifically is the default loaded when process.js doesn't exist - see process.js.

{
  "backgrounds": { "default": null },
  "blocks": [
    { "id": "dealer_name", "type": "text", "text": "{dealer_name}", "x_mm": 10, "y_mm": 10, "width_mm": 80, "height_mm": 8 }
  ]
}

Top-level keys

Key Required Type Meaning
backgrounds no object Page name ("default", or a page number as a string) → background value.
blocks yes array of object See below.

Common block keys

Every block, regardless of type, has these:

Key Required Type Meaning
id yes string Unique across every partial included in one generation run.
type yes string text | image | box | signature | qr | grid.
x_mm / y_mm yes number Top-left corner, mm from the page's top-left.
width_mm / height_mm yes number Bounding box, mm.
page no int Default 1.
condition no string Bare expression (no {...} wrapper) - see Scripting & Processing → Conditions & Expressions. Falsy hides the block. Omit to always show it.
z_index no int Default 0. Higher paints on top.

text

Key Required Type Meaning
text no string Template: literal text, or {...}-wrapped JS for anything dynamic (e.g. "{'$' + inputs.sale_price}"). Null/omitted renders nothing. A result containing \n wraps as a multi-line paragraph.
style.font_size no number Default 12.
style.font_weight no string normal* | bold.
style.font_family no string See Assets & Fonts.
style.color no string Hex. Default #000000.
style.background_color no string Hex, or omitted for transparent.
style.align no string left* | center | right | stretch.
style.valign no string top* | center | bottom | stretch.
style.overflow no string hide* | show | shrink. shrink only applies to single-line text.

image

Key Required Type Meaning
source.asset no string Path relative to the project folder (e.g. "assets/logo.png").
source.field no string Field id - value is a file path or base64 PNG. Exactly one of source.asset/source.field is normally set.
fit no string contain* | fill | cover | none.

A missing asset or unfilled field omits the block, not an error.

box

Key Required Type Meaning
fill_color no string Hex, or omitted for no fill.
border_color no string Hex, or omitted for no border.
border_width_mm no number Default 0.
border_radius_mm no number Default 0.

signature

Key Required Type Meaning
field yes string A signature-type field's id.
fit no string contain* | fill | cover | none.

qr

Key Required Type Meaning
data no string Same template syntax as text. Empty/omitted omits the block.
color no string Hex module color. Default #000000.
background_color no string Hex, or omitted for transparent.

grid

Key Required Type Meaning
columns yes int Cells per row.
data no string Bare JS expression (no {...} wrapper) evaluating to an array. Each element is one cell; wraps to a new row every columns elements. A cell is either a literal value or an object with a text key plus any style overrides below. data wins over source_field/column_keys when both are set.
column_widths no array of number Relative weights, one per column (e.g. [3, 1]). Omitted = equal widths.
min_rows / max_rows no int No default bound - row count is purely content-driven unless set.
source_field no string Declarative alternative to data: a repeating-group field id, flattened into cells using column_keys.
column_keys no array of string Used with source_field - one repeating-group sub-field key per column.

style (grid-level default) and a per-cell object both take these keys - note real CSS names, hyphenated, not this app's usual snake_case:

Key Type Meaning
background-color string Hex.
color string Hex. Default #000000.
font-family string See Assets & Fonts.
font-size number Default 11.
padding number mm. Default 1.
text-align string left* | center | right.
vertical-align string top | middle* | bottom.
border-color string A cell that sets this gets its own border box instead of the shared grid line.
border-width number mm. Default 0.

A grid never splits across pages and is never clipped to its nominal height_mm - it grows to fit its content. Full usage notes and examples: Block Types Reference, Generating Grid Data.

Constraints