<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ImmersiveSpaceContent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21ImmersiveSpaceContentP"
  },
  "title" : "ImmersiveSpaceContent"
}
-->

# ImmersiveSpaceContent

A type that you can use as the content of an immersive space.

```
@MainActor @preconcurrency protocol ImmersiveSpaceContent
```

## Overview

A type conforming to this protocol inherits `@preconcurrency @MainActor`
isolation from the protocol if the conformance is included in the type’s
base declaration:

```
struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}
```

Isolation to the main actor is the default, but it’s not required. Declare
the conformance in an extension to opt out of main actor isolation:

```
extension MyCustomType: Transition {
    // `nonisolated` by default
}
```

## Topics

### Creating immersive space content

[`var body: Self.Body`](/documentation/SwiftUI/ImmersiveSpaceContent/body-swift.property)

[`associatedtype Body : ImmersiveSpaceContent`](/documentation/SwiftUI/ImmersiveSpaceContent/Body-swift.associatedtype)

## Relationships

### Conforming Types

[`Content`](/documentation/SwiftUI/CompositorContentBuilder/Content)

[`ImmersiveSpaceViewContent`](/documentation/SwiftUI/ImmersiveSpaceViewContent)

---

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)