View Source Spacer

<Spacer>

A view that expands to provide space between other views.

Overview

<VStack>
    <Text>First</Text>
    <Spacer minLength="50" />
    <Text>Second</Text>
</VStack>

Within horizontal and vertical stacks, the spacer only grows along the stack’s axis. Otherwise, the spacer grows in both axes.

Attributes

SwiftUI Documentation

See SwiftUI.Spacer for more details on this View.

References

The minimum size of the spacer. If not provided, the minimum length is the system spacing.