The Collapsible Container component for Retool Mobile
A container to group other components.
Settings
Collapsible Container includes the following configurable options when building apps in the IDE.
Properties
All properties for Collapsible Container with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
Values
left | Left alignment. |
center | Center alignment. |
right | Right alignment. |
collapsedIcon
The icon that's displayed when collapsed.
collapsible
Whether collapsible add-ons are configured.
cornerType
The corner style to use.
Values
square | Square corners. |
round | Rounded corners. |
Values
none | No elevated style. |
raised | Raised elevated style. |
Properties
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Values
datasource | Control query. |
widget | Control component. |
script | Run script. |
state | Set variable. |
localStorage | Set localStorage. |
util | Perform utility action (e.g., Open URL or Confetti). |
expandedIcon
The icon that's displayed when expanded.
global
Whether the object is globally scoped for use in all app pages.
Whether the component is visible.
id
The unique identifier.
isHiddenOnDesktop
Whether the component is visible in the desktop layout.
isHiddenOnMobile
Whether the component is visible in the mobile layout.
Values
left | Left alignment. |
center | Center alignment. |
right | Right alignment. |
stretched | Justified alignment |
maintainSpaceWhenHidden
Whether the component takes up space on the canvas if hidden
is true
.
padding
The amount of padding to render inside.
pluginType
The plugin type.
showBorder
Whether to show a border.
showInEditor
Whether to remain visible in the editor if hidden
is true
.
title
The text to display as a title.
widthGrowFactor
Sets the width grow factor of a width item's main width size, similar to the flex-grow
CSS property.
Methods
JavaScript API methods for interacting with Collapsible Container. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
setHidden
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
collapsibleContainer.setHidden(hidden)
Parameters
Whether the component is visible.
Events
Events are triggered by user interactions, such as clicking a button or entering a value. Use event handlers to trigger queries or other actions in response to events.
click
The item is clicked or pressed.