Modules
A collection of components and code.
A module is a type of app you can build and embed within other apps. Modules enable you to reuse components and code in multiple apps, and modules can pass data to and from the parent app. This can help reduce app maintenance as you only need to update a module; any parent apps immediately reflect the changes.
Refer to the modules guide for more information about creating and using modules.
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.
heightType
Whether the height automatically adjusts to fit content or is a fixed size.
Type | string | ||||||
Format | Plain Text | ||||||
Configurability | Inspector > Spacing > Height | ||||||
Allowed Values |
| ||||||
Default | fixed |
id
The unique identifier (name).
Type | string |
Format | Plain Text |
Configurability | Inspector |
Default | modules1 |
Examples
query1
button1
overflowType
The overflow behavior when the contents exceed the height.
Type | string | ||||||
Configurability | Inspector | ||||||
Allowed Values |
| ||||||
Default | null |
showFetchingIndicator
Whether to show a loading indicator when the module's contents are being fetched.
Type | boolean |
Configurability | Read-only |
Default | null |
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
modules.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
modules.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring modules
into view.
modules.scrollIntoView({behavior: 'auto', block: 'nearest'});
modules.setOutput(outputName, value)