<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -",
    "macCatalyst: 16.4.0 -",
    "macOS: 13.3.0 -",
    "tvOS: 16.4.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/presentationBackground(alignment:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE22presentationBackground9alignment7contentQrAA9AlignmentV_qd__yXEtAaBRd__lF"
  },
  "title" : "presentationBackground(alignment:content:)"
}
-->

# presentationBackground(alignment:content:)

Sets the presentation background of the enclosing sheet to a custom
view.

```
nonisolated func presentationBackground<V>(alignment: Alignment = .center, @ContentBuilder content: () -> V) -> some View where V : View
```

## Parameters

`alignment`

The alignment that the modifier uses to position the
implicit [`ZStack`](/documentation/SwiftUI/ZStack) that groups the background views. The default is
[`center`](/documentation/SwiftUI/Alignment/center).

`content`

The view to use as the background of the presentation.

## Discussion

The following example uses a yellow view as the sheet background:

```
struct ContentView: View {
    @State private var showSettings = false

    var body: some View {
        Button("View Settings") {
            showSettings = true
        }
        .sheet(isPresented: $showSettings) {
            SettingsView()
                .presentationBackground {
                    Color.yellow
                }
        }
    }
}
```

The `presentationBackground(alignment:content:)` modifier differs from
the [`background(alignment:content:)`](/documentation/SwiftUI/View/background(alignment:content:)) modifier in several key
ways. A presentation background:

- Automatically fills the entire presentation.
- Allows views behind the presentation to show through translucent
  areas of the `content` on supported platforms.

> Note: Sheet presentations on macOS do not support translucency
> or transparency — the background is always opaque.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)