Text Variable
Text content. Plain string or rich TextRun[]. Insert it inline as '{{<id>}}' inside any string (rich text is flattened to plain text there), or reference it whole as 'var:<id>' in a field that accepts string or TextRun[] (the rich runs are kept).
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| type | const | yes | Variable kind. One of color, text, number, date, image, url or list.
|
| value | string | array<ref:TextRun> | — | Text this variable resolves to: a plain string, or TextRun[] for rich text. |
| required | boolean | — | Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted. |
| label | string | — | Optional short human label for forms and fill panels. |
| description | string | — | Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents. |
| example | string | array<ref:TextRun> | — | Illustrative text shown in fill forms and used when a template is previewed with examples. Never written to output. |
| maxLength | integer | — | The most characters the value may have, counted as a reader sees them (an accented letter or an emoji counts once, however it is encoded). Checked on the declared value and on a value given to a fill; a longer value is the warning opf/variable-overflow. Fill forms and models read it before writing. |
| maxLines | integer | — | The most lines the value may take where it is drawn. Checked by composition at each place the variable is drawn (a title, a subtitle, a text block or a list entry), because the line count depends on the width of the box; a value that takes more lines is the warning opf/variable-overflow at that place, naming the slide. Inside longer text, the lines are those the variable's own characters occupy. |
| translations | object | — | The text in other languages, keyed by language tag, each entry a 'value' in the same form as the variable's own (a string or TextRun[]). Where the variable is drawn, the slide's declared language (else the deck's) selects an entry: the exact tag, then the tag with its last subtag removed, and so on ('de-AT', then 'de'), compared without regard to case; no match draws 'value'. A language read from the text does not select one. A fill that gives the variable a new value without translations removes them. |
type
typeconstrequiredyesdefault—
Variable kind. One of color, text, number, date, image, url or list.
type· Allowed values"text"
{
"type": "text"
}value
typestring | array<ref:TextRun>requirednodefault—
Text this variable resolves to: a plain string, or TextRun[] for rich text.
value (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"
required
typebooleanrequirednodefaulttrue
Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
label
typestringrequirednodefault—
Optional short human label for forms and fill panels.
description
typestringrequirednodefault—
Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
example
typestring | array<ref:TextRun>requirednodefault—
Illustrative text shown in fill forms and used when a template is previewed with examples. Never written to output.
example (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"
maxLength
typeintegerrequirednodefault—
The most characters the value may have, counted as a reader sees them (an accented letter or an emoji counts once, however it is encoded). Checked on the declared value and on a value given to a fill; a longer value is the warning opf/variable-overflow. Fill forms and models read it before writing.
maxLines
typeintegerrequirednodefault—
The most lines the value may take where it is drawn. Checked by composition at each place the variable is drawn (a title, a subtitle, a text block or a list entry), because the line count depends on the width of the box; a value that takes more lines is the warning opf/variable-overflow at that place, naming the slide. Inside longer text, the lines are those the variable's own characters occupy.
translations
typeobjectrequirednodefault—
The text in other languages, keyed by language tag, each entry a 'value' in the same form as the variable's own (a string or TextRun[]). Where the variable is drawn, the slide's declared language (else the deck's) selects an entry: the exact tag, then the tag with its last subtag removed, and so on ('de-AT', then 'de'), compared without regard to case; no match draws 'value'. A language read from the text does not select one. A fill that gives the variable a new value without translations removes them.
translations.*.value (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"
Complete definition constraints
{
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "text",
"description": "Variable kind. One of color, text, number, date, image, url or list."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}
],
"description": "Text this variable resolves to: a plain string, or TextRun[] for rich text."
},
"required": {
"type": "boolean",
"default": true,
"description": "Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted."
},
"label": {
"type": "string",
"description": "Optional short human label for forms and fill panels."
},
"description": {
"type": "string",
"description": "Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents."
},
"example": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}
],
"description": "Illustrative text shown in fill forms and used when a template is previewed with examples. Never written to output."
},
"maxLength": {
"type": "integer",
"minimum": 1,
"description": "The most characters the value may have, counted as a reader sees them (an accented letter or an emoji counts once, however it is encoded). Checked on the declared value and on a value given to a fill; a longer value is the warning opf/variable-overflow. Fill forms and models read it before writing."
},
"maxLines": {
"type": "integer",
"minimum": 1,
"description": "The most lines the value may take where it is drawn. Checked by composition at each place the variable is drawn (a title, a subtitle, a text block or a list entry), because the line count depends on the width of the box; a value that takes more lines is the warning opf/variable-overflow at that place, naming the slide. Inside longer text, the lines are those the variable's own characters occupy."
},
"translations": {
"type": "object",
"propertyNames": {
"$ref": "#/$defs/LanguageTag"
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": [
"value"
],
"properties": {
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/TextRun"
}
}
]
}
}
},
"minProperties": 1,
"description": "The text in other languages, keyed by language tag, each entry a 'value' in the same form as the variable's own (a string or TextRun[]). Where the variable is drawn, the slide's declared language (else the deck's) selects an entry: the exact tag, then the tag with its last subtag removed, and so on ('de-AT', then 'de'), compared without regard to case; no match draws 'value'. A language read from the text does not select one. A fill that gives the variable a new value without translations removes them."
}
},
"description": "Text content. Plain string or rich TextRun[]. Insert it inline as '{{<id>}}' inside any string (rich text is flattened to plain text there), or reference it whole as 'var:<id>' in a field that accepts string or TextRun[] (the rich runs are kept)."
}