---
title: "windowResizability(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/scene/windowresizability(_:)"
---

# windowResizability(_:)

Sets the kind of resizability to use for a window.

## Declaration

```swift
nonisolated func windowResizability(_ resizability: WindowResizability) -> some Scene

```

## Parameters

- `resizability`: The resizability to use for windows created by this scene.

## Return Value

Return Value A scene that uses the specified resizability strategy.

## Discussion

Discussion Use this scene modifier to apply a value of type WindowResizability to a Scene that you define in your App declaration. The value that you specify indicates the strategy the system uses to place minimum and maximum size restrictions on windows that it creates from that scene. For example, you can create a window group that people can resize to between 100 and 400 points in both dimensions by applying both a frame with those constraints to the scene’s content, and the contentSize resizability to the scene: @main struct MyApp: App {     var body: some Scene {         WindowGroup {             ContentView()                 .frame(                     minWidth: 100, maxWidth: 400,                     minHeight: 100, maxHeight: 400)         }         .windowResizability(.contentSize)     } } The default value for all scenes if you don’t apply the modifier is automatic. With that strategy, Settings windows use the contentSize strategy, while all others use contentMinSize.

## See Also

### Sizing a window

- [Positioning and sizing windows](visionos/positioning-and-sizing-windows.md)
- [defaultSize(_:)](swiftui/scene/defaultsize(_:).md)
- [defaultSize(width:height:)](swiftui/scene/defaultsize(width:height:).md)
- [defaultSize(width:height:depth:)](swiftui/scene/defaultsize(width:height:depth:).md)
- [defaultSize(_:in:)](swiftui/scene/defaultsize(_:in:).md)
- [defaultSize(width:height:depth:in:)](swiftui/scene/defaultsize(width:height:depth:in:).md)
- [WindowResizability](swiftui/windowresizability.md)
- [windowIdealSize(_:)](swiftui/scene/windowidealsize(_:).md)
- [WindowIdealSize](swiftui/windowidealsize.md)
