Skip to content

Grid ​

Arranges children in a grid.

luau
PeanutUI.Frame {
    grid = {
        cellSize = PeanutUI.Size(64, 64),
        gap = PeanutUI.Size(8, 8),
    }
}

Properties ​

PropertyTypeDescription
gapSizeSpace between cells.
cellSizeSizeSize of each cell.
horizontalbooleanFill horizontally.
sortByNamebooleanSort children by name.
fillDirectionMaxCellsnumberMax cells per row/column.
absoluteContentSizeVector2Absolute content size.
horizontalAlign"Left" | "Center" | "Right"Horizontal alignment.
verticalAlign"Top" | "Center" | "Bottom"Vertical alignment.
startCorner"TopLeft" | "TopRight" | "BottomLeft" | "BottomRight"Starting corner.