<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Scene/immersionStyle(selection:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ScenePAAE14immersionStyle9selection2inQrAA7BindingVyAA09ImmersionE0_pG_AaI_pdtF"
  },
  "title" : "immersionStyle(selection:in:)"
}
-->

# immersionStyle(selection:in:)

Sets the style for an immersive space.

```
nonisolated func immersionStyle(selection: Binding<any ImmersionStyle>, in styles: any ImmersionStyle...) -> some Scene
```

## Parameters

`selection`

A [`Binding`](/documentation/SwiftUI/Binding) to the style that the space uses. You can
change this value to change the scene’s style even after you
present the immersive space. Even though you provide a binding,
the value changes only if you change it.

`styles`

The list of styles that the `selection` input can have.
Include any styles that you plan to use during the lifetime
of the scene.

## Return Value

A scene that uses one of the specified `styles`.

## Discussion

Use this modifier to configure the appearance and behavior of an
[`ImmersiveSpace`](/documentation/SwiftUI/ImmersiveSpace). Specify a style that conforms to the
[`ImmersionStyle`](/documentation/SwiftUI/ImmersionStyle) protocol, like [`mixed`](/documentation/SwiftUI/ImmersionStyle/mixed) or
[`full`](/documentation/SwiftUI/ImmersionStyle/full). For example, the following app defines a
solar system scene that uses full immersion:

```
@main
struct SolarSystemApp: App {
    @State private var style: ImmersionStyle = .full

    var body: some Scene {
        ImmersiveSpace {
            SolarSystem()
        }
        .immersionStyle(selection: $style, in: .full)
    }
}
```

---

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)