Skip to content

Text element

Text, with {expressions} interpolated.

- { type: text, value: ... }
text.report.yaml
title: Text
culture: en-US
parameters:
Customer: { type: string, default: "='Contoso Ltd'" }
body:
reportHeader:
- gap: 6pt
content:
- { type: text, value: Quarterly report, fontSize: 18pt, fontWeight: bold, tag: h1 }
- { type: text, value: "Prepared for {Customer} on {Date(2026, 9, 24):D}.", color: "#6B4428" }
- type: text
width: 60%
align: justify
value: >-
Text wraps to the width of its box. This paragraph is justified, so every line
but the last one reaches both edges of the column.
- type: text
width: 45%
italic: true
overflow: ellipsis
maxLines: 1
value: A long line that is cut short with an ellipsis instead of wrapping
The text example, rendered by Tagua.

Type: text · Required

Text template, e.g. "{Sum(Population):N0} people". Grows to fit unless height is fixed.

Type: keyword · Default: wrap

What happens to text that does not fit its width (or its height, when fixed).

One of:

  • wrap: Wraps onto as many lines as the text needs.
  • clip: Cuts off what does not fit.
  • ellipsis: Ends the last line that fits with an ellipsis.
  • shrink: Reduces the font size until the text fits.

Type: whole number

The most lines to show; the rest overflows.

Type: list of object

Styles that apply where their condition holds, e.g. a negative amount in red.

Type: object

Style properties taken from the data, e.g. color: =StatusColor.

Type: keyword · Default: none

Reads the text as HTML, with its bold, italic and coloured parts, and its line breaks.

One of:

  • none: As it is: every character is shown.
  • html: As a small subset of HTML, once its expressions are filled in: b, strong, i, em, u, s, br, paragraphs and divs, lists, headings (in bold), font color, and the color, font-weight, font-style and text-decoration of a style attribute. Spaces collapse, and entities such as & are read. Other tags are left out, with their text kept; font sizes and faces are not used.

It also has the properties of every element and the style properties.