FioriButtonGlassEffectStyle
public enum FioriButtonGlassEffectStyle
Defines the visual glass effect appearance applied to a FioriGlassButtonStyle.
Use this enum to control how the glass material effect is rendered on a Fiori button. Glass effects are available on iOS 26, macOS 26, tvOS 26, and watchOS 26 and later, and are not available on visionOS.
Overview
There are three available styles:
systemManaged: Delegates glass rendering to the system. Use this when placing the button inside a container such as a toolbar or navigation bar, where the system automatically applies the appropriate glass background.plain: Applies a standard, untinted glass material effect. The button label uses the primary label color. This is the default style forFioriGlassButtonStyle.tint: Applies a glass material effect tinted with the app’s tint color. The button label uses white to ensure legibility against the tinted background.
Example
// Default plain glass effect
FioriButton { _ in Text("Confirm") }
.fioriButtonStyle(FioriGlassButtonStyle())
// Tinted glass effect using the app's tint color
FioriButton { _ in Text("Confirm") }
.fioriButtonStyle(FioriGlassButtonStyle(glassEffect: .tint))
// Inside a toolbar — let the system handle the glass background
FioriButton { _ in Text("Done") }
.fioriButtonStyle(FioriGlassButtonStyle(glassEffect: .systemManaged))
-
Delegates the glass effect rendering to the system.
Use this case when the button is placed inside a container that already provides a glass background, such as a toolbar or navigation bar. The system automatically supplies the appropriate glass material, so no additional glass effect is applied by
FioriGlassButtonStyleitself.Declaration
Swift
case systemManaged -
Applies a standard, untinted glass material effect to the button.
The button label uses the primary label color for legibility. This is the default glass effect style for
FioriGlassButtonStyle.Declaration
Swift
case plain -
Applies a glass material effect tinted with the app’s tint color.
The button label color is set to white to maintain legibility against the tinted glass background.
Declaration
Swift
case tint