In there a way to apply the glass effect to an Image with for example ForegroundStyle in SwiftUI?

Asked on 2025-09-12

1 search

Yes, you can apply the glass effect to an image in SwiftUI using the new Liquid Glass design elements introduced at WWDC. To do this, you can use the gloss effect modifier in SwiftUI. This modifier allows you to apply a gloss effect within a capsule shape behind your content, such as an image. You can customize the shape of the gloss effect by providing a shape to the modifier. Additionally, for interactive elements, you can add the interactive modifier to the gloss effect, which allows the gloss to react to user interactions by scaling, bouncing, and shimmering.

For more detailed guidance, you can refer to the session Build a SwiftUI app with the new design (17:57) where Liquid Glass effects are discussed.