<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/windowResizeBehavior(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20windowResizeBehavioryQrAA017WindowInteractionF0VF"
  },
  "title" : "windowResizeBehavior(_:)"
}
-->

# windowResizeBehavior(_:)

Configures the resize functionality for the window enclosing `self`.

```
nonisolated func windowResizeBehavior(_ behavior: WindowInteractionBehavior) -> some View
```

## Parameters

`behavior`

The resize behavior.

## Discussion

By default, the window resizability functionality is determined by the
scene, as well as any modifiers applied to it. Additionally, when using
the [`windowResizability(_:)`](/documentation/SwiftUI/Scene/windowResizability(_:)) modifier, the minimum and maximum
size of the window’s contents will also determine the resizability
behavior.

You can use this modifier to override the default behavior.

For example, you can create a custom “About” window which only allows
for dismissal:

```
struct MyApp: App {
    var body: some Scene {
        ...
        Window("About MyApp", id: "about") {
            AboutView()
                .windowResizeBehavior(.disabled)
                .windowMinimizeBehavior(.disabled)
        }
        .windowResizability(.contentSize)
    }
}
```

---

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)