HWAlignment
Cross- and main-axis alignment enums for HWColumn and HWRow.
HWAlignment
Alignment enums consumed by HWColumn and HWRow.
The cross-axis is the axis perpendicular to the layout direction:
HWColumn(vertical) — cross-axis is horizontal, main-axis is vertical.HWRow(horizontal) — cross-axis is vertical, main-axis is horizontal.
HWCrossAxisAlignment
| Value | Description |
|---|---|
start | Align children to the cross-axis start. |
center | Center children along the cross-axis. |
end | Align children to the cross-axis end. |
HWMainAxisAlignment
| Value | Description |
|---|---|
start | Pack children at the main-axis start. |
center | Center children along the main-axis. |
end | Pack children at the main-axis end. |
spaceBetween | Distribute children with equal space between them. |
spaceEvenly | Distribute children with equal space between, before, and after. |
Platform mapping
- iOS: maps to SwiftUI
HorizontalAlignment/VerticalAlignmenton the stack, withSpacers inserted to model thespaceBetween/spaceEvenlyvalues. - Android: maps to Glance
Alignment.Horizontal/Alignment.Verticalon theColumn/Row, withSpacers for the space-distribution values.