---
title: backgroundMaterial
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/environmentvalues/backgroundmaterial
---

# backgroundMaterial

The material underneath the current view.

## Declaration

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

## Discussion

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, like background(_:ignoresSafeAreaEdges:) or background(_:in:fillStyle:), and passing in a Material. You can also set the value manually, using nil to disable vibrant rendering, or a Material instance to enable the vibrancy style associated with the specified material.

## See Also

### Layering views

- [Adding a background to your view](swiftui/adding-a-background-to-your-view.md)
- [ZStack](swiftui/zstack.md)
- [zIndex(_:)](swiftui/view/zindex(_:).md)
- [background(alignment:content:)](swiftui/view/background(alignment:content:).md)
- [background(_:ignoresSafeAreaEdges:)](swiftui/view/background(_:ignoressafeareaedges:).md)
- [background(ignoresSafeAreaEdges:)](swiftui/view/background(ignoressafeareaedges:).md)
- [background(_:in:fillStyle:)](swiftui/view/background(_:in:fillstyle:).md)
- [background(in:fillStyle:)](swiftui/view/background(in:fillstyle:).md)
- [overlay(alignment:content:)](swiftui/view/overlay(alignment:content:).md)
- [overlay(_:ignoresSafeAreaEdges:)](swiftui/view/overlay(_:ignoressafeareaedges:).md)
- [overlay(_:in:fillStyle:)](swiftui/view/overlay(_:in:fillstyle:).md)
- [containerBackground(_:for:)](swiftui/view/containerbackground(_:for:).md)
- [containerBackground(for:alignment:content:)](swiftui/view/containerbackground(for:alignment:content:).md)
- [ContainerBackgroundPlacement](swiftui/containerbackgroundplacement.md)
