<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WindowManagerRole",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17WindowManagerRoleV"
  },
  "title" : "WindowManagerRole"
}
-->

# WindowManagerRole

Options for defining how a scene’s windows behave when used within a managed
window context, such as full screen mode and Stage Manager.

```
struct WindowManagerRole
```

## Overview

Use values of this type in conjunction with the
[`windowManagerRole(_:)`](/documentation/SwiftUI/Scene/windowManagerRole(_:)) modifier to override the default system
behavior.

For example, you can specify that a secondary `Window` scene should use the
principal role for full screen and Stage Manager:

```
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        Window("Organizer", id: "organizer") {
            OrganizerView()
        }
        .windowManagerRole(.principal)
    }
}
```

## Topics

### Type Properties

[`static let associated: WindowManagerRole`](/documentation/SwiftUI/WindowManagerRole/associated)

The associated role. Windows derived from this scene can be shown
alongside windows with a `.principal` role in either full screen or
Stage Manager, but do not participate in those modes on their own.

[`static let automatic: WindowManagerRole`](/documentation/SwiftUI/WindowManagerRole/automatic)

The automatic role. The type and configuration of the scene will be
used to determine how its windows behave in full screen and Stage
Manager.

[`static let principal: WindowManagerRole`](/documentation/SwiftUI/WindowManagerRole/principal)

The principal role. Windows derived from this scene will show in full
screen, if enabled, or in Stage Manager.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)