<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EnvironmentValues/backgroundMaterial",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesV18backgroundMaterialAA0F0VSgvp"
  },
  "title" : "backgroundMaterial"
}
-->

# backgroundMaterial

The material underneath the current view.

```
var backgroundMaterial: Material? { get set }
```

## Discussion

This value is `nil` if the current background isn’t one of the standard
materials. If you set a material, the standard content styles enable
their vibrant rendering modes.

You set this value by calling one of the background modifiers that takes
a [`ShapeStyle`](/documentation/SwiftUI/ShapeStyle), like [`background(_:ignoresSafeAreaEdges:)`](/documentation/SwiftUI/View/background(_:ignoresSafeAreaEdges:))
or [`background(_:in:fillStyle:)`](/documentation/SwiftUI/View/background(_:in:fillStyle:)), and passing in a
[`Material`](/documentation/SwiftUI/Material). You can also set the value manually, using
`nil` to disable vibrant rendering, or a [`Material`](/documentation/SwiftUI/Material) instance to
enable the vibrancy style associated with the specified material.

---

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)