<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DisplayProxy",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12DisplayProxyV"
  },
  "title" : "DisplayProxy"
}
-->

# DisplayProxy

A type which provides information about display hardware.

```
struct DisplayProxy
```

## Overview

You can use this type with your custom window layouts to size and position
windows relative to a display’s bounds.

For example, your custom window layout can position a window 140 points from
the bottom of the screen’s visible area:

```
Window("Status", id: "status") {
    StatusView()
}
.windowResizability(.contentSize)
.defaultWindowPlacement { content, context in
    let displayBounds = context.defaultDisplay.visibleRect
    let size = content.sizeThatFits(.unspecified)
    let position = CGPoint(
        x: displayBounds.midX - (size.width / 2),
        y: displayBounds.maxY - size.height - 140)
    return WindowPlacement(position: position, size: size)
}
```

## Topics

### Instance Properties

[`let bounds: CGRect`](/documentation/SwiftUI/DisplayProxy/bounds)

The full dimensions of the display, including any space occupied by
system interface elements.

[`let safeAreaInsets: EdgeInsets`](/documentation/SwiftUI/DisplayProxy/safeAreaInsets)

The safe area inset of this display.

[`let visibleRect: CGRect`](/documentation/SwiftUI/DisplayProxy/visibleRect)

The portion of the display where it is safe to place windows.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

---

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)