<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ContentMode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11ContentModeO"
  },
  "title" : "ContentMode"
}
-->

# ContentMode

Constants that define how a view’s content fills the available space.

```
@frozen enum ContentMode
```

## Topics

### Getting content modes

[`ContentMode.fill`](/documentation/SwiftUI/ContentMode/fill)

An option that resizes the content so it occupies all available space,
both vertically and horizontally.

[`ContentMode.fit`](/documentation/SwiftUI/ContentMode/fit)

An option that resizes the content so it’s all within the available space,
both vertically and horizontally.



---

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)