<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ContentMarginPlacement",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI22ContentMarginPlacementV"
  },
  "title" : "ContentMarginPlacement"
}
-->

# ContentMarginPlacement

The placement of margins.

```
struct ContentMarginPlacement
```

## Overview

Different views can support customizating margins that appear in
different parts of that view. Use values of this type to customize
those margins of a particular placement.

For example, use a [`scrollIndicators`](/documentation/SwiftUI/ContentMarginPlacement/scrollIndicators)
placement to customize the margins of scrollable view’s scroll
indicators separately from the margins of a scrollable view’s
content.

Use this type with the [`contentMargins(_:for:)`](/documentation/SwiftUI/View/contentMargins(_:for:)) modifier.

## Topics

### Getting the placement

[`automatic`](/documentation/SwiftUI/ContentMarginPlacement/automatic)

The automatic placement.

[`scrollContent`](/documentation/SwiftUI/ContentMarginPlacement/scrollContent)

The scroll content placement.

[`scrollIndicators`](/documentation/SwiftUI/ContentMarginPlacement/scrollIndicators)

The scroll indicators placement.



---

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)