Layout / The visual dictionary
Spacer.
A flexible empty region used to distribute remaining space.
Also calledflexible spacespring
01
UI illustrationSee it in context
Brand
← Flexible space →
Action02
What it is
A flexible empty region used to distribute remaining space. Let the spacer expand between elements while keeping nearby groups together.
When to use it
Use it to push toolbar actions to opposite sides or separate groups.
Know the difference
A spacer consumes layout space; padding adds space inside a specific element.
03
Across platforms
WebiOSiPadOSAndroidmacOSWindowsLinuxwatchOSWear OStvOSAndroid TVvisionOS
Web · iOS · iPadOS · Android · macOS · Windows · Linux · watchOS · Wear OS · tvOS · Android TV · visionOS
SwiftUI offers Spacer; web flex layouts can use auto margins or a growing empty region.
04
Go to the source
Primary documentation for the pattern and its platform conventions.