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
Configurability Inspector > Appearance > Hidden
Defaultfalse
Examples
true

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!

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.

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(key, value)
Parameters

key

The key.

Type string

value

The value.

Type string | number | boolean | object | array

Examples

Set the current value of heading to userValue.

heading.setValue(userValue);