The behavior for how materials appear active and inactive.
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)
Members (3)
get · iOS 18.0+
matchWindow
TypeScript
static get matchWindow(): MaterialActiveAppearance
Swift declaration
static let matchWindow: MaterialActiveAppearance
Materials will have an active or inactive appearance based on
the active appearance of their window.
On non-macOS platforms, materials will always appear as active.
get · iOS 18.0+
active
TypeScript
static get active(): MaterialActiveAppearance
Swift declaration
static let active: MaterialActiveAppearance
Materials will always appear active.
get · iOS 18.0+
automatic
TypeScript
static get automatic(): MaterialActiveAppearance
Swift declaration
static let automatic: MaterialActiveAppearance
Materials will automatically appear active or inactive based on context
and platform convention.
Examples of automatic behavior on macOS:
- Materials used as a `window` container background will appear inactive
when the containing window is inactive.
- `Material.bar` materials will appear inactive when the containing
window is inactive.
- All other materials will appear as active.
Materials always appear as active on all other platforms.