Caption
A caption for an image, chart, table or video payload. A string or TextRun[] is the caption text placed below the media; object form adds the position and alignment.
Metadata
Field index
This definition uses the forms or value constraints below.
oneOf 1 · string
Exact constraints for oneOf 1
{
"type": "string"
}oneOf 2 · array<ref:TextRun>
Exact constraints for oneOf 2
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}oneOf 3 · object
| Field | Type | Req. | Default | Description |
|---|---|---|---|---|
| text | string | array<ref:TextRun> | yes | — | Caption text: a string or TextRun[] for inline rich text. |
| position | enum | — | — | Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height.
|
| align | enum | — | — | Horizontal alignment of the caption text within the block. Defaults to left.
|
text
typestring | array<ref:TextRun>requiredyesdefault—
Caption text: a string or TextRun[] for inline rich text.
position
typeenumrequirednodefault—
Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height.
position· Allowed values"below""above"
{
"position": "below"
}align
typeenumrequirednodefault—
Horizontal alignment of the caption text within the block. Defaults to left.
align· Allowed values"left""center""right"
{
"align": "left"
}Exact constraints for oneOf 3
{
"type": "object",
"required": [
"text"
],
"additionalProperties": false,
"properties": {
"text": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}
],
"description": "Caption text: a string or TextRun[] for inline rich text."
},
"position": {
"type": "string",
"enum": [
"below",
"above"
],
"description": "Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height."
},
"align": {
"type": "string",
"enum": [
"left",
"center",
"right"
],
"description": "Horizontal alignment of the caption text within the block. Defaults to left."
}
}
}Complete definition constraints
{
"description": "A caption for an image, chart, table or video payload. A string or TextRun[] is the caption text placed below the media; object form adds the position and alignment.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
},
{
"type": "object",
"required": [
"text"
],
"additionalProperties": false,
"properties": {
"text": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}
],
"description": "Caption text: a string or TextRun[] for inline rich text."
},
"position": {
"type": "string",
"enum": [
"below",
"above"
],
"description": "Where the caption band sits inside the block's region: below the media (default) or above it. Core composition reserves the band and shrinks the media by its height."
},
"align": {
"type": "string",
"enum": [
"left",
"center",
"right"
],
"description": "Horizontal alignment of the caption text within the block. Defaults to left."
}
}
}
],
"examples": [
"Figure 1. Quarterly revenue by region",
{
"text": "Source: internal reporting",
"position": "above",
"align": "center"
}
]
}