Caption
A caption for an image, chart, table, video, embed or diagram 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 start. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
|
text
typestring | array<ref:TextRun>requiredyesdefault—
Caption text: a string or TextRun[] for inline rich text.
text (oneOf 2)[] (oneOf 2).color (anyOf 2).color· Named choices (see schema for other values and constraints)"accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"
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 start. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
align· Allowed values"start""center""end"
{
"align": "start"
}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": [
"start",
"center",
"end"
],
"description": "Horizontal alignment of the caption text within the block. Defaults to start. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge."
}
}
}Complete definition constraints
{
"description": "A caption for an image, chart, table, video, embed or diagram 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": [
"start",
"center",
"end"
],
"description": "Horizontal alignment of the caption text within the block. Defaults to start. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge."
}
}
}
],
"examples": [
"Figure 1. Quarterly revenue by region",
{
"text": "Source: internal reporting",
"position": "above",
"align": "center"
}
]
}