Layout / The visual dictionary
Stack layout.
A row or column that arranges child elements in one sequence.
Also calledvertical stackhorizontal stack
01
UI illustrationSee it in context
Vertical
Horizontal
02
What it is
A row or column that arranges child elements in one sequence. Keep a consistent gap between siblings and align them along a shared axis.
When to use it
Use it for form rows, button groups, and simple vertical sections.
Know the difference
A stack is one-dimensional; a grid explicitly coordinates rows and columns.
03
Across platforms
WebiOSiPadOSAndroidmacOSWindowsLinuxwatchOSWear OStvOSAndroid TVvisionOS
Web · iOS · iPadOS · Android · macOS · Windows · Linux · watchOS · Wear OS · tvOS · Android TV · visionOS
SwiftUI uses stack containers; web layouts often use flex direction to express the same relationship.
04
Go to the source
Primary documentation for the pattern and its platform conventions.