Text element and dynamic text
The Text element is a rich-text paragraph for a widget: body copy, fine print, captions or labels above a title. Like every text in a widget, it supports dynamic text: placeholders such as {visitor.firstName} or {geo.city} that are replaced with the visitor's own values when the widget shows.
Available on: all platforms.
Options
Option | What it does | Values / default |
|---|---|---|
Text | Edited directly in the editor; the toolbar sets bold, italic, color, links and alignment | Published as a <p> paragraph |
Typography | Color, font, size, line height, letter spacing, style, text transform, text wrap, alignment | Defaults from your branding |
Text wrap | How lines break | Pretty (default for text) avoids a single word on the last line |
Style, Size, Spacing, Position | Background, border, radius, shadow, opacity, scale; width and height; padding and margin; placement | — |
Device, Animation | See Widget elements | All devices, no animation |
Templates use two styled variants of the Text element: an eyebrow (a small, tracked label above a title) and a caption (a quiet line under a call to action). They're ordinary Text elements with different styles.
Dynamic text
Write a variable in curly braces anywhere in the text, with an optional fallback in single quotes, and Personizely replaces it with the visitor's value when the widget shows: Welcome back, {visitor.firstName or 'friend'}!. In the editor, the Placeholder button (the { } icon) in the text toolbar inserts one for you.
Dynamic text works in every text of a widget, not only the Text element: headlines, button and form labels, the HTML element, link and action URLs and image URLs. For every available value (visitor, geo, company, data, query, variable and datetime), the fallback rules and how values are encoded in URLs, see Dynamic text.
Behavior details and limitations
- Preview uses sample values. In the editor's preview, dynamic text is filled with sample data (for example, a visitor named John from San Francisco). Use Preview and QA on your site to see real values.
- Typos show as text. A variable that doesn't match the syntax, such as {visitor.first name}, is shown as written.
Examples
- Personal greeting: Welcome back, {visitor.firstName or 'friend'}! Your 10% code is below.
- Local shipping message: Free 2-day shipping to {geo.city or 'your city'}.
- Day-aware promo: Happy {datetime.dayOfWeek}! Today's deal ends at midnight.