<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/MaterialActiveAppearance",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24MaterialActiveAppearanceV"
  },
  "title" : "MaterialActiveAppearance"
}
-->

# MaterialActiveAppearance

The behavior for how materials appear active and inactive.

```
struct MaterialActiveAppearance
```

## Overview

On macOS, materials have active and inactive appearances that can reinforce
the active appearance of the window they are in:

- Materials used as a `window` container background and `bar` materials
  will appear inactive when their containing window is inactive.
- All other materials will always appear active by default.

An explicit active appearance can be set to override a material’s default
behavior. For example, materials used as the `window` container background
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)
```

## Topics

### Type Properties

[`static let active: MaterialActiveAppearance`](/documentation/SwiftUI/MaterialActiveAppearance/active)

Materials will always appear active.

[`static let automatic: MaterialActiveAppearance`](/documentation/SwiftUI/MaterialActiveAppearance/automatic)

Materials will automatically appear active or inactive based on context
and platform convention.

[`static let inactive: MaterialActiveAppearance`](/documentation/SwiftUI/MaterialActiveAppearance/inactive)

Materials will always appear inactive.

[`static let matchWindow: MaterialActiveAppearance`](/documentation/SwiftUI/MaterialActiveAppearance/matchWindow)

Materials will have an active or inactive appearance based on
the active appearance of their window.

## Relationships

### Conforms To

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

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

[`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)