Skip to main content

The Heading 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
Mutability
ControlUsage
Retool UI Inspector > Appearance > Hidden
MethodsetHidden()
Default
false
Examples
true

textAlign

The alignment of the text within the input field.

Type string
Mutability Read-only
Allowed Values
ValueDescription
left

Left-aligned text.

center
right

Right-aligned text.


value

The current or default value.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Default value
MethodsetValue()
Default
null
Examples
Hello world!

width

The width.

Type string
Format Integer
Mutability
ControlUsage
Retool UI Inspector
Allowed Values
ValueDescription
full

Full width.

fixed

Fixed width.

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.

heading.clearValue()

Clear the current values.

Definition
heading.clearValue()
Examples

Clear the current value of heading.

heading.clearValue();

heading.resetValue()

Reset the current value to the default value.

Definition
heading.resetValue()
Examples

Reset the current value of heading.

heading.resetValue();

heading.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
heading.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide heading.

heading.setHidden(true);

Unhide heading.

heading.setHidden(false);

heading.setValue()

Sets the value of the heading.

Definition
heading.setValue(value)
Parameters

value

The value.

Type string | number | boolean | object | array

Examples

Set the current value of heading to userValue.

heading.setValue(userValue);