<!--
{
  "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/EdgeInsets",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10EdgeInsetsV"
  },
  "title" : "EdgeInsets"
}
-->

# EdgeInsets

The inset distances for the sides of a rectangle.

```
@frozen struct EdgeInsets
```

## Topics

### Getting edge insets

[`top`](/documentation/SwiftUI/EdgeInsets/top)

[`bottom`](/documentation/SwiftUI/EdgeInsets/bottom)

[`leading`](/documentation/SwiftUI/EdgeInsets/leading)

[`trailing`](/documentation/SwiftUI/EdgeInsets/trailing)

### Creating an edge inset

[`init()`](/documentation/SwiftUI/EdgeInsets/init())

[`init(top:leading:bottom:trailing:)`](/documentation/SwiftUI/EdgeInsets/init(top:leading:bottom:trailing:))

[`init(_:)`](/documentation/SwiftUI/EdgeInsets/init(_:))

Creates a 2D `EdgeInsets` from an `EdgeInsets3D`, dropping its
`front` and `back` values.



---

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)