<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShapeStyle/windowBackground",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ShapeStylePA2A016WindowBackgroundcD0VRszrlE06windowF0AEvpZ"
  },
  "title" : "windowBackground"
}
-->

# windowBackground

A style appropriate for elements that should match the background
of their containing window.

```
@export(implementation) static var windowBackground: WindowBackgroundShapeStyle { get }
```

## Discussion

On macOS, this has a unique appearance compared to the default
`ShapeStyle.background`. It matches the default background of a
window: a wallpaper-tinted light gray in the light appearance and a
wallpaper-tinted dark gray in the dark appearance.

On visionOS, the default glass window background can only be created
using `glassBackgroundEffect`.

For information about how to use shape styles, see [`ShapeStyle`](/documentation/SwiftUI/ShapeStyle).

---

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)