overlayArrangementEdge

The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout.

View ModifieriOS 27.1+macOS 27.1+tvOS 27.1+watchOS 27.1+visionOS 27.1+

Overloads

2 ways to call compose().overlayArrangementEdge(). Each is one SwiftUI overload, picked by the arguments you pass.

React
compose().overlayArrangementEdge(
  edge: SwiftUI.HorizontalEdge | null
)
Swift
nonisolated func overlayArrangementEdge(
    _ edge: HorizontalEdge?
) -> some View

Parameters

Discussion

Use this modifier to anchor the given view when its overlay layout transitions into a horizontal layout. For example, to move the view to the trailing side of the arrangement view, use the trailing edge.

var body: some View {
    ArrangementView {
        ControlsView()
            .overlayArrangementEdge(.trailing)
    } secondary: {
        ContentView()
    }
}

See also

More in Appearance.