Login
Free Sign Up
Docs
/

Text

Type identifier: text Category: Experience Blocks

Description

Block for rendering textual content. Supports plain strings, rich content objects, or a datumReference, with optional typography and semantic HTML element configuration.

Content Formats

The Text block accepts one of:

  1. string
  2. { content } (rich content payload)
  3. datumReference

When content includes variable nodes, they render as {variable} placeholders in the editor and resolve to the referenced datum value at runtime. Each variable node can carry an optional defaultValue; when the referenced value is empty, the defaultValue is shown (or nothing, if it is not set).

Properties

Property

Type

Required

Notes

id

string

Yes

Block identifier.

type

"text"

Yes

Block discriminator.

text

string | { content } | datumReference

Yes

Main text value.

fallbackText

string

No

Fallback value for a datumReference text. Per-variable fallbacks use the variable node's defaultValue.

size

CSS size

No

Text size control.

htmlElement

Semantic element (see below)

No

Semantic rendering element.

states

State[]

No

Optional state-specific overrides.

Additional optional fields include entityContext, query, forEach, lineClamp, spacing props, raw style props, and typography props. align is deprecated in favour of textAlign.

Semantic HTML Elements

Available values include:

  • headings: h1-h6
  • text elements: p, blockquote, address, figcaption, label, legend
  • other: li, time, output, caption

States

State entries use the shared state shape with optional overrides of the Text block properties (excluding id, type, name, states).

No states are currently available for Text blocks.

Minimal Valid Example

{
  "id": "txt-1",
  "type": "text",
  "text": "Hello world"
}