Layout / The visual dictionary

Stack layout.

A row or column that arranges child elements in one sequence.

Also calledvertical stackhorizontal stack
01

See it in context

UI illustration
Vertical
Horizontal

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.

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.

Primary documentation for the pattern and its platform conventions.