Interactive previews iPhone Duo

Overlay Arrangement ZIndex

The z-index for a view within an overlay arrangement view.

Overlay Arrangement ZIndex - Preview Not Available

Platform Compatibility

iOS 27.1+ iPadOS 27.1+

Tags

SwiftUI Code

Docs
var body: some View {
    ArrangementView {
        SecondaryView()
    } secondary: {
        Color.orange
    }
    .arrangementViewStyle(.overlay)
}

struct SecondaryView: View {
    @Environment(\.overlayArrangementZIndex) var zIndex

    var body: some View {
        Color.blue
            .frame(width: 210, height: 210)
            .opacity(zIndex == 0 ? 1.0 : 0)
    }
}

Found an issue or have a suggestion?

Created: September 28, 2026Updated: October 20, 2026
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More ArrangementView Components

View all
Overlay Arrangement Edge - iOS on iPhone Duo - Landscape - Partially Open - Liquid Glass - Light Mode - Preview
modifier

Overlay Arrangement Edge

The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout. In this case, the primary view overlays the secondary view at the trailing edge when the screen is partially open in landscape.

Overlay Arrangement Style - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
style

Overlay Arrangement Style

An arrangement view style that layers the primary view over the secondary view in z-order.

Only Horizontal Split Arrangement Style - iOS on iPhone Duo - Portrait - Fully Open - Liquid Glass - Light Mode - Preview
style

Only Horizontal Split Arrangement Style

Creates a horizontal split arrangement only in portrait orientation. In landscape orientation, no split is applied.

Split Arrangement Layout Ratio - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
modifier

Split Arrangement Layout Ratio

Sets the preferred size ratio for an arrangement view in a split style. Use this modifier when you want to customize the size of the view compared to its other views in the split layout.

ArrangementView - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
initializer

ArrangementView

Creates an arrangement view with a primary and secondary view.

Explore Other Components

Browse all
Stepped Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Slider

Creates a slider to select a value from a given range, subject to a step increment

Custom Icon Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Icon Store View

Creates a view to load a collection of products from the App Store using product identifiers, and merchandise them using a custom image.

AccessoryCircularCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularCapacityGaugeStyle

A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value

Menu - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Menu

A control for presenting a menu of actions.

List Section Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

List Section Margins

Set the section margins for the specific edges.

Stepped Min Max Label Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Min Max Label Slider

Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels

Content Unavailable - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Content Unavailable

A placeholder for empty results with optional button

Default Min List Row Height - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Default Min List Row Height

The default minimum height of rows in a list.