Stacks are containers that group multiple elements together in a horizontal or vertical layout.
They act like a flexible canvas within your page, allowing you to precisely position and arrange elements to keep them from overlapping or drifting apart as the screen resizes.
In the Inspector panel, make relevant changes to the settings.
Besides other common settings (colors, backgrounds, effects, etc.), settings specialized for Stack are included in the Design tab > Auto layout.
Direction: Set the way the stack will flow:
(Vertical): Add, remove, and reorder objects along the y-axis.
(Horizontal): Add, remove, and reorder objects along the x-axis.
(Wrap): Arrange objects in multiple rows and columns in a frame. Objects will flow horizontally and wrap to the next line.
Distribute: Set the alignment of the element when stacked horizontally.
Align: Set the alignment of the element when stacked vertically.
Gap: Change the gap (margin) between the rows and columns within the stack.
If the stack direction is set to vertical or horizontal, you'll be able to set the gap between elements vertically (row gap) or horizontally (column gap), respectively.
When you select a stack in the editor, the margins between the elements are indicated by the pink strips. Move elements further apart or closer together by dragging these handles to adjust the spacing of all the elements at once.
Pro tip: The margins (pink strips) between the elements included in a stack are equally set. If you want to make an element that is further apart from others, you can set more spacing to that element specifically.
Padding: Padding controls the empty or white space between the boundary of a stack and the elements within it. You can adjust padding uniformly for all sides, or fine-tune it individually for top, right, bottom, or left.
When an element is placed within a Stack (Auto-layout), it cannot be freely repositioned. Instead, it aligns with the direction of the stack. However, enabling the Absolute Position option allows you to freely drag and position the element as needed, just like in normal layouts.
Static: Default position; follows the normal layout flow.
Relative: Stays in the layout flow but can be moved slightly from its original spot.
Absolute: Removed from the layout flow and positioned relative to its nearest positioned ancestor or the page.
Sticky: Acts like relative but becomes fixed when scrolling reaches a set point (e.g., sticky headers).
Static position places elements according to the normal flow, without allowing custom positioning adjustments.
Relative position acts as a container for Absolute elements, allowing them to be positioned relative to the container.
The Absolute Position option lets you freely drag and position the element, just like in regular layouts.
You can customize the spacing of a sticky element by adjusting the Inset setting.