NUI / Components / Layout

VerticalBox

ImplementedLayout

VerticalBox arranges children vertically.

Supported as a vertical stack layout.

Overview

VerticalBox arranges children vertically.

When to use

  • Use VerticalBox when matching Unreal-style layout naming is preferred over Column.

Children

Supports normal children.

nui
children {
    Text ChildText {
        text: "THIS IS THE CHILD COMPONENT"
    }
}

Basic syntax

nui
VerticalBox MenuColumn {
    gap: 8

    children {
        Text ChildText {
            text: "THIS IS THE CHILD COMPONENT"
        }
    }
}

Supported properties

PropertyTypeRequiredDefaultDescription
gapnumberNo0Space between children.
widthnumberNoAutoDesired width.
heightnumberNoAutoDesired height.
paddingmarginNomargin(0)Inner padding.
childPaddingmarginNomargin(0)Padding around children.
horizontalAlignenumNoInheritedComponent horizontal alignment.
verticalAlignenumNoInheritedComponent vertical alignment.
contentHorizontalAlignenumNoInheritedChild horizontal alignment.
contentVerticalAlignenumNoInheritedChild vertical alignment.
opacitynumberNo1Render opacity.
layerintegerNoContext defaultLayer order inside layered parents.
visibleboolNotrueVisibility flag.

Contextual properties

Contextual property rules

VerticalBox may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. Children of VerticalBox may use fill or auto. See section 7.

Full syntax example

nui
VerticalBox MenuColumn {
    gap: 8
    width: 260
    height: 360
    padding: margin(10)
    childPadding: margin(2)
    horizontalAlign: fill
    verticalAlign: top
    contentHorizontalAlign: fill
    contentVerticalAlign: top
    opacity: 1
    layer: 1
    visible: true

    children {
        Text ChildText {
            text: "THIS IS THE CHILD COMPONENT"
        }
    }
}

Limitations

  • Column is the shorter public-facing name for the same common layout intent.