Container
Group components in a card. It supports scaling with content or remaining a fixed size with overflow options, showing or hiding sections of content or separating into multiple views, and can be disabled to prevent interaction with nested components.
Properties
Available properties for Container with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
Whether the component has an enabled Click event handler.
The index of the currently selected view
The key of the currently selected view
Whether user input, interaction, or selection is disabled.
Whether the container is in full bleed mode, where it can only contain a single component which expands to fit the available space.
The amount of padding used within the footer.
The amount of padding used within the header.
Whether the height automatically resizes to fit content or is a fixed size.
Whether the component is visible.
Whether to display a loading indicator whenever nested components are fetching data.
Whether the component is currently hovered.
The configuration mode for option lists. Either dynamic
for mapped options or static
for manual options.
Whether to display a loading indicator.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
The overflow behavior when the contents exceeds the height of the component. Either scroll
to display a scrollbar or hidden
to clip the contents.
The amount of padding used within the container.
Whether to display the body of the component if heightType
is auto
.
Whether to show the border around the component.
Whether to display the footer area of the component.
Whether to show the border above the footer area.
Whether to display the header area of the component.
Whether to show the border under the header area.
Whether the component remains visible in the editor if hidden
is true
.
The text to display in a tooltip on hover or focus.
The transition animation to use when switching views
An array of all view keys
Settings for each view. All properties except key
are used by linked components that control this container, such as Tabs.
Events
Events are triggered by user interactions with Container. Use event handling to trigger queries or other actions in response to events.
A user clicks the component. Clicking on a nested component only triggers this event on Container if the nested component is not configured to handle click events directly.
A user changes the current value.
Methods
Methods for interacting with Container. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Set showBody value for the container
Set showHeader value for the container
Set showFooter value for the container
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
Set the current view of the container by key. No-op if the key is not valid.
Set the current view of the container by index. No-op if the index is out of bounds.
Show the previous view of the container. Does nothing if the current view is the first view.
Show the previous view of the container. Does nothing if the current view is the first view.
Show the next view of the container. Does nothing if the current view is the last view.
Show the next visible view of the container. Does nothing if the current view is the last view.