The Text component for Retool Mobile
A content area to display text.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
hidden
Whether this object is hidden from view.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Hidden |
Default | false |
Examples
true
markdown
Whether to use Markdown formatting.
Type | boolean |
Format | True/False |
Configurability | Read-only |
Default | null |
Examples
true
size
The size of the text.
Type | string | ||||||
Configurability | Inspector | ||||||
Allowed Values |
| ||||||
Default | null |
textAlign
The alignment of the text within the input field.
Type | string | ||||||||
Configurability | Read-only | ||||||||
Allowed Values |
| ||||||||
Default | null |
value
The current or default value.
Type | string |
Format | Plain Text |
Configurability | Inspector > Content > Default value |
Default | null |
Examples
Hello world!
width
The width.
Type | string | ||||||
Format | Integer | ||||||
Configurability | Inspector | ||||||
Allowed Values |
| ||||||
Default | null |
Examples
1280
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
text.clearValue()
Examples
Clear the current value of text
.
text.clearValue();
text.resetValue()
Examples
Reset the current value of text
.
text.resetValue();
text.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
text.setHidden(hidden)
Parameters
Examples
true
Examples
Hide text
.
text.setHidden(true);
Unhide text
.
text.setHidden(false);
text.setValue(key, value)
Examples
Set the current value of text
to userValue
.
text.setValue(userValue);