{}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

Fields

FieldTypeReqDescription
modeenumauto chooses a grid from available space and content; grid uses columns; row and column use one horizontal or vertical track.
columnsintegerColumn count for grid. In auto mode this caps the number of columns.
gapnumberSpace between cells as a fraction of the container short edge (canvas at slide root). Default 0.03333333333333333.
paddingnumberInset 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.
minFontSizenumberMinimum 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.
overflowenumwarn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn.

mode

Type: enum · Optional · Default:

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

Type: integer · Optional · Default:

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

columns.json
{
  "columns": 1
}

gap

Type: number · Optional · Default:

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

gap.json
{
  "gap": 1
}

padding

Type: number · Optional · Default:

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

padding.json
{
  "padding": 1
}

weights

Type: array<number> · Optional · Default:

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

weights.json
{
  "weights": []
}

minFontSize

Type: number · Optional · Default:

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

Type: enum · Optional · Default:

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

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