OPF
← All posts

Layout

Let the layout follow the content

Reuse a structure without rebuilding boxes for every slide.

A comparison needs two sides. An agenda needs a sequence. A dashboard needs room for several measures.

OPF layouts describe regions and how content flows through them. Choose a layout by intent, then give it the content. A layout is one list of regions, declared once, in reading order; custom layouts use the same record as the built-in ones.

json
{
  "slides": [
    {
      "title": "Choose the smaller pilot",
      "layout": "two-column",
      "blocks": [
        {
          "text": "Start with one team."
        },
        {
          "text": "Review before expanding."
        }
      ]
    }
  ]
}
Live preview1 / 1

Loading preview…

A custom layout lists its regions once, in reading order. direction places them side by side ("row") or stacked ("column", the default), and size is each region's share of that direction: "regions": [{ "name": "main", "size": 2 }, { "name": "aside", "size": 1 }] makes main twice as wide as aside. A region can also be a nested list that runs the other way, which is how a layout gets two dimensions, and anchor can be written once for every region under it. A block targets a region by name with region.

Why it matters: teams can reuse the structure of a good slide and adapt it to a new message. Authors and agents spend less time positioning individual objects. Check previews and overflow when the amount of content changes.

Layouts and regions · Dynamic composition

Download the complete example. All names and figures in these examples are illustrative.