Skip to main content

Module stack

Module stack 

Source
Expand description

Stack-based layout primitives.

The submodules implement horizontal, vertical, and overlay stacks. These views arrange child content according to alignments and spacing and are the backbone of most declarative layouts in WaterUI.

Stack

Structs§

Alignment
Combined two-dimensional alignment used by layout containers.
HStack
A view that arranges its children in a horizontal line.
HStackLayout
Layout engine shared by the public HStack view.
HorizontalAlignment
Horizontal alignment guide handle.
VStack
A view that arranges its children in a vertical line.
VStackLayout
Layout engine shared by the public VStack view.
VerticalAlignment
Vertical alignment guide handle.
ZStack
A view that overlays its children, aligning them in front of each other.
ZStackLayout
Stacks an arbitrary number of children with a shared alignment.

Enums§

Axis
Defines the axis of a stack.
LazyStackAxis
The axis a LazyContainer can be virtualized along, together with the spacing and cross-axis alignment the stack was configured with.

Functions§

hstack
Convenience constructor that centres children and uses the default spacing.
lazy_stack_axis
Resolves a layout to the axis a lazy container can virtualize along.
vstack
Convenience constructor that centres children and uses the default spacing.
zstack
Creates a new ZStack with center alignment and the specified contents.