Skip to main content
Container is type of control that dictates the layout of other controls. The containers logic only affects direct child controls. Containers usually arrange child controls every frame by collecting their desired size via .Measure() and then providing them with the size that they can afford via .Arrange(). After calculation of the desired and afforded sizes of its children, the container can override the child components coordinates if needed. This document only covers some of the most commonly used containers. Additions expanding it with others are welcome.
This page is a stub and complete descriptions of how containers will react to new items being added, overflow, the subtleties with GridContainer etc. are not convered.

BoxContainer

BoxContainer is the most straightforward layout control. It lays out its children sequentially in a certain Orientation, either vertically or horizontally. Controls do not overlap.

GridContainer

GridContainer lays out its children in a configurable grid.

ScrollContainer

ScrollContainer is a container that shows a cropped view of its children, with optional scrolling either vertically, horizontally, or both.

LayoutContainer

LayoutContainer helps in complicated layouts by allowing its children to specify how they should be laid out. Then children of the LayoutContainer may use to following fields to control their layout:
Last modified on June 20, 2026