Variable-backed layouts allow you to dynamically control the state of layout components using variables. This enables you to build responsive applications where user interface elements react to user interactions, object properties, or custom logic defined in functions.
The following layout components support variable backing:
You can bind a string variable to a multi-page module to control which page is displayed. When the variable value matches a page's ID, that page becomes active.
To configure variable-backed page selection:
This feature is useful for deep linking to specific pages through URL parameters, navigating between pages based on user actions, or controlling page selection from parent modules through interface variables.
Layout events that switch pages do not update the value of the variable configured for variable-backed page selection. To keep the variable in sync with page changes triggered by events, use a set variable value event instead.
You can bind a Boolean variable to a section to control whether it is visible or hidden. By default, the section is hidden when the variable evaluates to true and visible when it evaluates to false. You can invert this default behavior by changing the Boolean selector to the right of the variable selection.
To configure variable-backed section visibility:
This differs from the collapse state feature in that hidden sections do not appear in the layout at all, whereas collapsed sections still show their headers and can be expanded by users. Events will not be offered to update section visibility. Use set variable value events instead.
You can bind a Boolean variable to a collapsible section to control whether it is expanded or collapsed. When the variable evaluates to true, the section is collapsed. When it evaluates to false, the section is expanded.
To configure variable-backed collapse state:
This feature is useful for expanding sections only when relevant data is present, or for coordinating the expand and collapse behavior of multiple sections.
Layout events that expand, collapse, or toggle sections do not update the value of the variable configured for variable-backed collapse state. To keep the variable in sync with section state changes triggered by events, use a set variable value event instead.
You can bind a Boolean variable to an overlay to control whether it is open or closed. When the variable evaluates to true, the overlay opens. When it evaluates to false, the overlay closes.
To configure variable-backed overlay state:
This feature is useful for opening overlays in response to events, controlling overlay state from parent modules through interface variables, or coordinating multiple overlays.
Layout events that open or close overlays will update the value of the variable configured for variable-backed open state. You can also configure an On close event to reset an upstream variable or perform other actions when the overlay is closed.
You can bind a string variable to a tab container to control which tab is currently selected. When the variable value matches a tab's ID, that tab becomes active. This works bidirectionally: selecting a tab updates the variable, and changing the variable selects the corresponding tab.
To configure variable-backed tab selection:
This feature is useful for synchronizing tab state across multiple tab containers, persisting the selected tab in the URL through a module interface variable, or programmatically changing tabs based on user actions elsewhere in the module.
Unlike page selection and section collapse state, layout events that change the selected tab will also update the value of the variable configured for variable-backed tab selection.