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.

Build a SwiftUI app with the new design
Explore the ways Liquid Glass transforms the look and feel of your app. Discover how this stunning new material enhances toolbars, controls, and app structures across platforms, providing delightful interactions and seamlessly integrating your app with the system. Learn how to adopt new APIs that can help you make the most of Liquid Glass.

Build a UIKit app with the new design
Update your UIKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Build an AppKit app with the new design
Update your AppKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.