---
title: "presentationBackgroundInteraction(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/presentationbackgroundinteraction(_:)"
---

# presentationBackgroundInteraction(_:)

Controls whether people can interact with the view behind a presentation.

## Declaration

```swift
nonisolated func presentationBackgroundInteraction(_ interaction: PresentationBackgroundInteraction) -> some View

```

## Parameters

- `interaction`: A specification of how people can interact with the view behind a presentation.

## Discussion

Discussion On many platforms, SwiftUI automatically disables the view behind a sheet that you present, so that people can’t interact with the backing view until they dismiss the sheet. Use this modifier if you want to enable interaction. The following example enables people to interact with the view behind the sheet when the sheet is at the smallest detent, but not at the other detents: struct ContentView: View {     @State private var showSettings = false

var body: some View {         Button("View Settings") {             showSettings = true         }         .sheet(isPresented: $showSettings) {             SettingsView()                 .presentationDetents(                     [.height(120), .medium, .large])                 .presentationBackgroundInteraction(                     .enabled(upThrough: .height(120)))         }     } }

## See Also

### Styling a sheet and its background

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