Text
Type identifier:
textCategory: 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:
string{ content }(rich content payload)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 |
|---|---|---|---|
|
| Yes | Block identifier. |
|
| Yes | Block discriminator. |
|
| Yes | Main text value. |
|
| No | Fallback value for a |
| CSS size | No | Text size control. |
| Semantic element (see below) | No | Semantic rendering element. |
|
| 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"
}