Skip to content

Text

Displays a single run of text — the simplest way to put words on a page.

Text components · element type text · binds through text templates

Related: Paragraph · Heading · Rich Text · HTML

Examples

// A fixed label
Invoice

// A value from your data
Invoice {$data.invoiceNumber} for {$data.customer.name}

// Inside a repeating element, where $it is the current item
{$it.person.name} - {$it.person.role}

// A formatted value, rendering as "Total: $45.00"
Total: {$data.order.amount:currency;USD;2}

// A fallback, used when the value is null
{$data.order.amount:currency;USD;2|Not priced}

In a data table cell the keyword is $record rather than $it. See text formats for every format.

Options

Option Values Default Description
Text Any text or template Text Content to display. Supports text templates
Text Align Left · Center · Right From theme Horizontal alignment within the slot
Vertical Align Top · Middle · Bottom Not set Vertical alignment within the slot
Whitespace Trim · Preserve Trim Preserve keeps line breaks and indentation exactly as entered

Styling

Every value below falls back to the theme until you set it on the component.

Option Values Default Description
Font Family Theme fonts From theme Typeface
Font Size Any CSS unit From theme e.g. 10pt, 1.2em
Text Color Palette or custom From theme
Font Weight Normal · Bold · numeric From theme
Line Height Number or CSS unit From theme Spacing between wrapped lines
Text Transform None · Uppercase · Lowercase · Capitalize From theme
Margin Top / Margin Bottom Any CSS unit From theme Vertical spacing around the element
Style CSS Empty Custom CSS, through the style editor

Notes

  • Double-click the component on the canvas to edit its text in place
  • Add the text to a dictionary to have it translated per language
  • Match the keyword to the scope: $it in a repeating element, $record in a data table cell, $data elsewhere