OPF
SpecDefinition referenceView source

Variable

A single named variable: a hex string (shorthand for a color variable) or an object whose 'type' is color, text, number, date, image, url or list. 'value' is the current value and is optional: a variable with no value is unfilled, which a template allows and a normal deck does not. 'example' only illustrates the slot (fill forms, template previews) and never reaches output.

Metadata

Definition
#/$defs/Variable
Form
8 alternative forms (oneOf)
Source
spec/schemas/opf.schema.json

Field index

This definition uses the forms or value constraints below.

oneOf 1 · ref:HexColor

Referenced HexColor · string

Hex color shorthand accepted by selected string fields.

Exact constraints for Referenced HexColor
Referenced HexColor schema
{
  "type": "string",
  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
  "description": "Hex color shorthand accepted by selected string fields.",
  "examples": [
    "#fff",
    "#ffff00",
    "#0F172AFF"
  ]
}
Exact constraints for oneOf 1
oneOf 1 schema
{
  "$ref": "#/$defs/HexColor"
}

oneOf 2 · ref:ColorVariable

Referenced ColorVariable · object

A named color. Content color fields reference it as 'var:<id>'. Colors resolve at render time through the ordinary color-reference path, so a color variable keeps working as before.

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"color"
valueref:HexColor——Hex color this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
exampleref:HexColor——Illustrative color shown in fill forms and used when a template is previewed with examples. Never written to output.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"color"
type.json
{
  "type": "color"
}

value

typeref:HexColorrequirednodefault—

Hex color this variable resolves to.

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

typeref:HexColorrequirednodefault—

Illustrative color shown in fill forms and used when a template is previewed with examples. Never written to output.

Exact constraints for Referenced ColorVariable
Referenced ColorVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "color",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "$ref": "#/$defs/HexColor",
      "description": "Hex color this variable resolves to."
    },
    "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": {
      "$ref": "#/$defs/HexColor",
      "description": "Illustrative color shown in fill forms and used when a template is previewed with examples. Never written to output."
    }
  },
  "description": "A named color. Content color fields reference it as 'var:<id>'. Colors resolve at render time through the ordinary color-reference path, so a color variable keeps working as before."
}
Exact constraints for oneOf 2
oneOf 2 schema
{
  "$ref": "#/$defs/ColorVariable"
}

oneOf 3 · ref:TextVariable

Referenced TextVariable · object

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).

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"text"
valuestring | array<ref:TextRun>——Text this variable resolves to: a plain string, or TextRun[] for rich text.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
examplestring | array<ref:TextRun>——Illustrative text shown in fill forms and used when a template is previewed with examples. Never written to output.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"text"
type.json
{
  "type": "text"
}

value

typestring | array<ref:TextRun>requirednodefault—

Text this variable resolves to: a plain string, or TextRun[] for rich text.

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.

Exact constraints for Referenced TextVariable
Referenced TextVariable schema
{
  "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."
    }
  },
  "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)."
}
Exact constraints for oneOf 3
oneOf 3 schema
{
  "$ref": "#/$defs/TextVariable"
}

oneOf 4 · ref:NumberVariable

Referenced NumberVariable · object

A number. '{{<id>}}' inserts it as text using 'format'; 'var:<id>' as a whole field supplies the number itself (chart values, font sizes).

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"number"
valuenumber——Number this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
examplenumber——Illustrative number shown in fill forms and used when a template is previewed with examples. Never written to output.
formatref:NumberFormat——Display pattern used by '{{<id>}}' (the shared NumberFormat syntax). A literal prefix, a numeric part of '#', '0', ',' and '.', and a literal suffix. '0' pads digits, '#' is optional, ',' groups thousands, digits after '.' fix the decimals ('0' required, '#' optional), and a '%' in the suffix scales by 100. English separators only. Absent: the shortest decimal form.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"number"
type.json
{
  "type": "number"
}

value

typenumberrequirednodefault—

Number this variable resolves to.

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

typenumberrequirednodefault—

Illustrative number shown in fill forms and used when a template is previewed with examples. Never written to output.

format

typeref:NumberFormatrequirednodefault—

Display pattern used by '{{<id>}}' (the shared NumberFormat syntax). A literal prefix, a numeric part of '#', '0', ',' and '.', and a literal suffix. '0' pads digits, '#' is optional, ',' groups thousands, digits after '.' fix the decimals ('0' required, '#' optional), and a '%' in the suffix scales by 100. English separators only. Absent: the shortest decimal form.

Exact constraints for Referenced NumberVariable
Referenced NumberVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "type": "number",
      "description": "Number this variable resolves to."
    },
    "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": {
      "type": "number",
      "description": "Illustrative number shown in fill forms and used when a template is previewed with examples. Never written to output."
    },
    "format": {
      "$ref": "#/$defs/NumberFormat",
      "description": "Display pattern used by '{{<id>}}' (the shared NumberFormat syntax). A literal prefix, a numeric part of '#', '0', ',' and '.', and a literal suffix. '0' pads digits, '#' is optional, ',' groups thousands, digits after '.' fix the decimals ('0' required, '#' optional), and a '%' in the suffix scales by 100. English separators only. Absent: the shortest decimal form."
    }
  },
  "description": "A number. '{{<id>}}' inserts it as text using 'format'; 'var:<id>' as a whole field supplies the number itself (chart values, font sizes)."
}
Exact constraints for oneOf 4
oneOf 4 schema
{
  "$ref": "#/$defs/NumberVariable"
}

oneOf 5 · ref:DateVariable

Referenced DateVariable · object

A calendar date as an ISO YYYY-MM-DD string. No time zone and no clock are involved. '{{<id>}}' inserts it formatted with 'format'.

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"date"
valuestring——ISO calendar date (YYYY-MM-DD) this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
examplestring——Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output.
formatstring——Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"date"
type.json
{
  "type": "date"
}

value

typestringrequirednodefault—pattern^\d{4}-\d{2}-\d{2}$

ISO calendar date (YYYY-MM-DD) this variable resolves to.

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

typestringrequirednodefault—pattern^\d{4}-\d{2}-\d{2}$

Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output.

format

typestringrequirednodefault—

Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.

format.json
{
  "format": "MMMM d, yyyy"
}
Exact constraints for Referenced DateVariable
Referenced DateVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "ISO calendar date (YYYY-MM-DD) this variable resolves to."
    },
    "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": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output."
    },
    "format": {
      "type": "string",
      "description": "Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.",
      "examples": [
        "MMMM d, yyyy",
        "dd MMM yyyy",
        "M/d/yyyy",
        "EEEE, MMMM d"
      ]
    }
  },
  "description": "A calendar date as an ISO YYYY-MM-DD string. No time zone and no clock are involved. '{{<id>}}' inserts it formatted with 'format'."
}
Exact constraints for oneOf 5
oneOf 5 schema
{
  "$ref": "#/$defs/DateVariable"
}

oneOf 6 · ref:ImageVariable

Referenced ImageVariable · object

An image source: any Asset (an 'asset:<id>' reference, HTTPS URL, data URI, relative or local path, or an object with src, alt and metadata). Reference it whole as 'var:<id>' in an image, asset or src field; '{{<id>}}' inserts the source string.

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"image"
valueref:Asset——Image source this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
exampleref:Asset——Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"image"
type.json
{
  "type": "image"
}

value

typeref:Assetrequirednodefault—

Image source this variable resolves to.

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

typeref:Assetrequirednodefault—

Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output.

Exact constraints for Referenced ImageVariable
Referenced ImageVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "image",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "$ref": "#/$defs/Asset",
      "description": "Image source this variable resolves to."
    },
    "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": {
      "$ref": "#/$defs/Asset",
      "description": "Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output."
    }
  },
  "description": "An image source: any Asset (an 'asset:<id>' reference, HTTPS URL, data URI, relative or local path, or an object with src, alt and metadata). Reference it whole as 'var:<id>' in an image, asset or src field; '{{<id>}}' inserts the source string."
}
Exact constraints for oneOf 6
oneOf 6 schema
{
  "$ref": "#/$defs/ImageVariable"
}

oneOf 7 · ref:UrlVariable

Referenced UrlVariable · object

A link target (http, https, mailto or tel). Use it as '{{<id>}}' inside a link string or reference it whole as 'var:<id>' in a link field.

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"url"
valuestring——Link target this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
examplestring——Illustrative link shown in fill forms and used when a template is previewed with examples. Never written to output.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"url"
type.json
{
  "type": "url"
}

value

typestringrequirednodefault—pattern^(?:https?://|mailto:|tel:)\S+$

Link target this variable resolves to.

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

typestringrequirednodefault—pattern^(?:https?://|mailto:|tel:)\S+$

Illustrative link shown in fill forms and used when a template is previewed with examples. Never written to output.

Exact constraints for Referenced UrlVariable
Referenced UrlVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "url",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "type": "string",
      "pattern": "^(?:https?://|mailto:|tel:)\\S+$",
      "description": "Link target this variable resolves to."
    },
    "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": {
      "type": "string",
      "pattern": "^(?:https?://|mailto:|tel:)\\S+$",
      "description": "Illustrative link shown in fill forms and used when a template is previewed with examples. Never written to output."
    }
  },
  "description": "A link target (http, https, mailto or tel). Use it as '{{<id>}}' inside a link string or reference it whole as 'var:<id>' in a link field."
}
Exact constraints for oneOf 7
oneOf 7 schema
{
  "$ref": "#/$defs/UrlVariable"
}

oneOf 8 · ref:ListVariable

Referenced ListVariable · object

A list of strings, for bullets and list items. A whole-string array element 'var:<id>' splices every entry into the array in place; a whole field 'var:<id>' becomes the array; '{{<id>}}' joins the entries with ', ' (or the separator after a pipe: '{{<id>|; }}').

FieldTypeReq.DefaultDescription
typeconstyes—Variable kind. One of color, text, number, date, image, url or list.
type · Allowed values
"list"
valuearray<string>——Entries this variable resolves to.
requiredboolean—trueWhether 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.
labelstring——Optional short human label for forms and fill panels.
descriptionstring——Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
examplearray<string>——Illustrative entries shown in fill forms and used when a template is previewed with examples. Never written to output.

type

typeconstrequiredyesdefault—

Variable kind. One of color, text, number, date, image, url or list.

type · Allowed values
"list"
type.json
{
  "type": "list"
}

value

typearray<string>requirednodefault—

Entries this variable resolves to.

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

typearray<string>requirednodefault—

Illustrative entries shown in fill forms and used when a template is previewed with examples. Never written to output.

Exact constraints for Referenced ListVariable
Referenced ListVariable schema
{
  "type": "object",
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "const": "list",
      "description": "Variable kind. One of color, text, number, date, image, url or list."
    },
    "value": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Entries this variable resolves to."
    },
    "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": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Illustrative entries shown in fill forms and used when a template is previewed with examples. Never written to output."
    }
  },
  "description": "A list of strings, for bullets and list items. A whole-string array element 'var:<id>' splices every entry into the array in place; a whole field 'var:<id>' becomes the array; '{{<id>}}' joins the entries with ', ' (or the separator after a pipe: '{{<id>|; }}')."
}
Exact constraints for oneOf 8
oneOf 8 schema
{
  "$ref": "#/$defs/ListVariable"
}
Complete definition constraints
Schema constraints
{
  "oneOf": [
    {
      "$ref": "#/$defs/HexColor"
    },
    {
      "$ref": "#/$defs/ColorVariable"
    },
    {
      "$ref": "#/$defs/TextVariable"
    },
    {
      "$ref": "#/$defs/NumberVariable"
    },
    {
      "$ref": "#/$defs/DateVariable"
    },
    {
      "$ref": "#/$defs/ImageVariable"
    },
    {
      "$ref": "#/$defs/UrlVariable"
    },
    {
      "$ref": "#/$defs/ListVariable"
    }
  ],
  "description": "A single named variable: a hex string (shorthand for a color variable) or an object whose 'type' is color, text, number, date, image, url or list. 'value' is the current value and is optional: a variable with no value is unfilled, which a template allows and a normal deck does not. 'example' only illustrates the slot (fill forms, template previews) and never reaches output.",
  "examples": [
    "#B42318",
    {
      "type": "color",
      "value": "#B42318",
      "description": "Risk emphasis."
    },
    {
      "type": "text",
      "example": "Acme Corp"
    },
    {
      "type": "list",
      "value": [
        "Faster",
        "Cheaper"
      ]
    }
  ]
}