---
title: "materialActiveAppearance(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/material/materialactiveappearance(_:)"
---

# materialActiveAppearance(_:)

Sets an explicit active appearance for this material.

## Declaration

```swift
func materialActiveAppearance(_ appearance: MaterialActiveAppearance) -> Material
```

## Discussion

Discussion Materials used as the window container background on macOS will automatically appear inactive when their the window appears inactive, but can be made to always appear active by setting the active appearance behavior to be always active: Text("Hello, World!")     .containerBackground(         Material.regular.materialActiveAppearance(.active),         for: .window)
