---
title: "presentationBackground(alignment:content:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/presentationbackground(alignment:content:)"
---

# presentationBackground(alignment:content:)

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

## Declaration

```swift
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 doc://com.apple.SwiftUI/documentation/SwiftUI/ZStack that groups the background views. The default is doc://com.apple.SwiftUI/documentation/SwiftUI/Alignment/center.
- `content`: The view to use as the background of the presentation.

## Discussion

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:) 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.

## See Also

### Styling a sheet and its background

- [presentationCornerRadius(_:)](swiftui/view/presentationcornerradius(_:).md)
- [presentationBackground(_:)](swiftui/view/presentationbackground(_:).md)
- [presentationBackgroundInteraction(_:)](swiftui/view/presentationbackgroundinteraction(_:).md)
- [PresentationBackgroundInteraction](swiftui/presentationbackgroundinteraction.md)
