Skip to content

Text

Shows text or a formatted value: a machine state, an operator message, a batch number, a short note. A format template places the value inside a sentence, color and size make it stand out, and msg.ui can change them with the value — for example red when the machine stops.

Property Type Default Description
label string Small title above the text (optional)
icon string Lucide icon before the label
format string Template for the value: {{payload}} °C, Batch {{payload.id}}. Empty shows the payload as is
size sm · md · lg · xl md Text size
align left · center · right left Alignment
color neutral · accent · success · warning · danger neutral Text color, from the theme
markdown boolean false Render **bold**, *italic*, `code`, [links](https://…) and - / 1. lists
msg.payload = 'RUNNING'; // shown as is
msg.payload = 21.5; // with format '{{payload}} °C' → 21.5 °C
msg.payload = { id: 'B-2041' }; // with format 'Batch {{payload.id}}' → Batch B-2041
msg.ui = { color: 'danger' }; // change any property, e.g. color by state

Objects without a format are shown as JSON. The text keeps line breaks and wraps; if it doesn’t fit, the widget scrolls.