Last modified: Dec 2, 2024

Text

A component that allows you to display text with or without label.

Usage

The Text component allows users to add structured text, with or without label.

Anatomy

  1. Horizontal: A text with label structured horizontally
    Text horizontal anatomy
    Text Horizontal
  2. Vertical: A text with label structured vertically
    Text vertical anatomy
    Text vertical

Properties

We are currently updating how we implement components, and the list of properties may not be entirely accurate.
PropertyTypeDescription
idstringUnique Id string for the component
valuestringThe text you want to display.
textResourceBindings.titlestringLabel of the text you want to display
directionstringSets the structured direction of label and value. Enum: "horizontal" | "vertical"

Configuration

Add component

{
  "id": "text",
  "type": "Text",
  "textResourceBindings": {
    "title": "Name"
  },
  "value": "My name",
  "direction": "horizontal",
},

Add title and elements


textResourceBindings.title

Label for the date. This can be added as a hardcoded string or as a reference to a text resource.

value

The value of the text to be displayed. Can be added as a string or an expression.

direction

Decides if the number should be shown under or next to the label. horizontal for showing it next to the label and vertical for under.


Example

Text with label.

...
{
  "id": "text",
  "type": "Text",
  "textResourceBindings": {
    "title": "Name"
  },
  "value": "My name",
  "direction": "horizontal",
},