Skip to main content

The Text component for Retool Mobile

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
Defaultfalse
Examples
true

markdown

Whether to use Markdown formatting.

Type boolean
Format True/False
Configurability Read-only
Defaultnull
Examples
true

size

The size of the text.

Type string
Configurability Inspector
Allowed Values
ValueDescription
default

The default size.

small

The smallest size.

Defaultnull

textAlign

The alignment of the text within the input field.

Type string
Configurability Read-only
Allowed Values
ValueDescription
left

Left-aligned text.

center
right

Right-aligned text.

Defaultnull

Examples
Hello world!

weight

The font weight of the text.

Type string
Configurability Inspector
Defaultnull

width

The width.

Type string
Format Integer
Configurability Inspector
Allowed Values
ValueDescription
full

Full width.

fixed

Fixed width.

Defaultnull
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()

Clear the current values.

Definition
text.clearValue()
Examples

Clear the current value of text.

text.clearValue();

text.resetValue()

Reset the current value to the default value.

Definition
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.

Definition
text.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide text.

text.setHidden(true);

Unhide text.

text.setHidden(false);

text.setValue()

Set the current value.

Definition
text.setValue(key, value)
Parameters

key

The key.

Type string

value

The value.

Type string | number | boolean | object | array

Examples

Set the current value of text to userValue.

text.setValue(userValue);