<!--
{
  "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/presentationBackgroundInteraction(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE33presentationBackgroundInteractionyQrAA012PresentationeF0VF"
  },
  "title" : "presentationBackgroundInteraction(_:)"
}
-->

# presentationBackgroundInteraction(_:)

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

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

## Parameters

`interaction`

A specification of how people can interact with the
view behind a presentation.

## 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)))
        }
    }
}
```

---

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)