API reference

Alignment Enum

Extends Sendable
Alignment options for positioning children within a FlexBox layout.
Controls how children are aligned along the main axis (alignment) or cross axis (crossAlignment), and how individual children override their parent's cross-axis alignment via ViewComponent/alignSelf(_:).

Signature

enum Alignment: Sendable

Enumeration Constants

MemberDescription
start
Align children to the start of the axis.
center
Center children along the axis.
end
Align children to the end of the axis.
stretch
Stretch children to fill the available space along the cross axis. Cross-axis only. On the main axis (FlexBox.alignment), .stretch behaves as Alignment.start.