The Fab component for Retool Mobile
A floating action button to trigger actions.
Fab floats above other content and remains at a fixed position.
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.
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
events
A list of configured event handlers that trigger actions or queries.
Type | array | ||||
Array values | object | ||||
Mutability |
|
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string | ||||
Mutability |
|
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string | ||||
Mutability |
|
type
The type of action to perform.
Type | string | ||||||||||||||
Mutability |
| ||||||||||||||
Allowed Values |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
icon
the icon to display.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
| ||||
Default |
|
Examples
/icon:bold/shopping-gift
loading
Whether to display a loading indicator.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
text
The primary text content.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
|
Examples
Submit
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
fab.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
fab.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable fab
.
fab.setDisabled(true);
Enable fab
.
fab.setDisabled(false);
fab.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
fab.setHidden(hidden)
Parameters
Examples
true
Examples
Hide fab
.
fab.setHidden(true);
Unhide fab
.
fab.setHidden(false);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Click | An item is clicked or pressed. |