OPF
DocsObject referenceView source

Composition

Portable dynamic composition. Slide fields override the resolved layout. Nested groups arrange their children independently, inheriting only minFontSize and overflow. Explicit promoted regions retain their pos…

Metadata

Definition
#/$defs/Composition
Type
object
Source
spec/schemas/opf.schema.json

Field index

FieldTypeReq.Description
modeenum—auto chooses a grid from available space and content; grid uses columns; row and column use one horizontal or vertical track.
columnsinteger—Column count for grid. In auto mode this caps the number of columns.
gapnumber—Space between cells as a fraction of the container short edge (canvas at slide root). Default 0.03333333333333333.
paddingnumber—Inset as a fraction of the container short edge. Default 0.08 on a slide, 0 inside a group.
weightsarray<number>—Relative track sizes: columns for row/grid/auto, rows for column. Omitted tracks have weight 1; extra weights are ignored.
minFontSizenumber—Minimum readable text size in reference pixels at a 720-pixel canvas short edge. Default 16. Overflow is diagnosed when text cannot fit at this size.
overflowenum—warn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn.

mode

typeenumrequirednodefault—

auto chooses a grid from available space and content; grid uses columns; row and column use one horizontal or vertical track.

mode.json
{
  "mode": "auto"
}

columns

typeintegerrequirednodefault—

Column count for grid. In auto mode this caps the number of columns.

columns.json
{
  "columns": 1
}

gap

typenumberrequirednodefault—

Space between cells as a fraction of the container short edge (canvas at slide root). Default 0.03333333333333333.

gap.json
{
  "gap": 1
}

padding

typenumberrequirednodefault—

Inset as a fraction of the container short edge. Default 0.08 on a slide, 0 inside a group.

padding.json
{
  "padding": 1
}

weights

typearray<number>requirednodefault—

Relative track sizes: columns for row/grid/auto, rows for column. Omitted tracks have weight 1; extra weights are ignored.

weights.json
{
  "weights": []
}

minFontSize

typenumberrequirednodefault—

Minimum readable text size in reference pixels at a 720-pixel canvas short edge. Default 16. Overflow is diagnosed when text cannot fit at this size.

minFontSize.json
{
  "minFontSize": 1
}

overflow

typeenumrequirednodefault—

warn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn.

overflow.json
{
  "overflow": "warn"
}