<!--
{
  "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/PresentationSizing/fitted",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18PresentationSizingPA2A06FittedcD0VRszrlE6fittedAEvpZ"
  },
  "title" : "fitted"
}
-->

# fitted

The presentation sizing is dictated by the ideal size of the content

```
static var fitted: FittedPresentationSizing { get }
```

## Discussion

On macOS, presentations with `.fitted` sizing are user-resizable
by default. Because of this, is best practice to define a presentation
frame with any of the `frame` modifiers, either specifying a fixed
frame or minimum/maximum bounds. If you specify a [`fixedSize()`](/documentation/SwiftUI/View/fixedSize())
or a frame with fixed dimensions on the content, the sheet will not be
user resizable.

```
@State private var present = true

ContentView().sheet(isPresented: $present) {
  ScrollView {
    LazyVGrid(columns: columns) {
      ForEach(0x1f600...0x1f679, id: \.self) { value in
        Text(String(format: "%x", value))
        Text(emoji(value))
          .font(.largeTitle)
        }
      }
  }
  .presentationSizing(.fitted)
  .frame(
    minWidth: 200, idealWidth: 300, maxWidth: 500,
    minHeight: 100, maxHeight: 600)
}
```

To create a view that fits the view’s size in either the horizontal or
vertical dimensions, see
[`fitted(horizontal:vertical:)`](/documentation/SwiftUI/PresentationSizing/fitted(horizontal:vertical:)).

---

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)