PPTX.gallery

Layout Pattern

Code 1x

A title above one code block with a text block beside it. Use it for an API call, a configuration or a short listing and the explanation that goes with it.

CodeDemoTechnical

How to Use It

A title above one code block with a text block beside it. Use it for an API call, a configuration or a short listing and the explanation that goes with it. OPF placeholders: title, code, text.

Content Zones

code-1x layout example

Try dynamic composition

Explore how a text slide reflows as you change its content and shape. These examples use OPF’s shared composition rules; the copied document includes your choices.

Let the content find its spaceStart with the decision. State what the audience should understand or do.Show the evidence. Give each supporting idea enough space to be read.Make the next step clear. Keep the action specific and easy to remember.

All sample text fits within its content areas.

View the complete OPF example
{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "Dynamic composition example",
  "design": {
    "dimensions": {
      "widthInches": 13.333333333333334,
      "heightInches": 7.5
    }
  },
  "slides": [
    {
      "title": "Let the content find its space",
      "composition": {
        "mode": "auto"
      },
      "blocks": [
        {
          "text": "Start with the decision. State what the audience should understand or do."
        },
        {
          "text": "Show the evidence. Give each supporting idea enough space to be read."
        },
        {
          "text": "Make the next step clear. Keep the action specific and easy to remember."
        }
      ]
    }
  ]
}

Composition rules and examples as JSON · Pagination rules and example JSON

Similar OPF layout slugs with matching content types, spatial patterns, or presentation use cases.

OPF Config

layouts:code-1x
Open Presentation Format
{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "PPTX.gallery — layouts/code-1x",
  "tags": [
    "gallery:layouts/code-1x"
  ],
  "slides": [
    {
      "id": "gallery-preview-1",
      "layout": "code-1x",
      "title": "Code 1x",
      "blocks": [
        {
          "code": {
            "source": "const result = 42;",
            "language": "javascript"
          }
        },
        {
          "text": "Explain the evidence."
        }
      ]
    }
  ]
}
Open in visual editorOpen in Inspector

Load this config in the gallery's visual editor, or in the Inspector at pptx.dev.