Skip to main content

Text

The most-used component. Displays a piece of text.

Usage

Tap the ➕ in the top-right of the editor and add text, then write what you want to display in the "content" field. It can be fixed text, a placeholder, or a mix of both.

Content fieldResult
HelloHello
{name}Shows the value of this.name from your JS
Hi {name}, it's {temp}° todayHi Alice, it's 26° today

For full placeholder syntax, see Placeholder syntax.

Common properties

PropertyDescription
ContentThe text / placeholder to display
Font sizeText size — a fixed number or a placeholder
FontSystem font or a custom font
ColorForeground color; supports solid or gradient
Line countNo limit by default (0 = unlimited); set to 1 for single line
Scale factorDefault 0.9 — when text is too long, it shrinks proportionally to fit
Truncation modeWhen text is too long and can't shrink further, where to clip from (head / middle / tail)
AlignmentCenter / leading / trailing
Rotation / OffsetFor special effects
Background colorText background, transparent by default
Corner radiusAdds rounded corners to the background
Font size can be dynamic too

Writing {size} in the font size field works — set this.size = 18 in JS to control the size dynamically.

Example: display one row of JS data

this.title = "Unread"
this.count = 12
ComponentContent
text{title}
text{count}
text (mixed){title}: {count} messages