Glass containers
Asked on 2025-06-11
1 search
Glass containers, specifically referred to as "glass effect containers," are used in app design to group multiple glass elements together. This grouping is essential for achieving visual consistency and improving performance. The glass effect container allows these elements to share their sampling region, which provides a more consistent visual result and requires only one sampling pass for the entire group. This is particularly useful because glass elements cannot directly sample other glass elements, which would otherwise lead to inconsistent visual results.
For example, in the session "Build an AppKit app with the new design," it is explained that using a glass effect container allows multiple glass shapes to fluidly join and separate using a liquid visual effect. This is achieved by creating an NS glass effect container view and setting the stack view as its content view. The container and its content view are constrained together using auto layout, which allows for a clean integration into existing layouts.
Similarly, in the session "Build a SwiftUI app with the new design," the use of a glass effect container is demonstrated to group badges in the Landmarks app, allowing for fluid morphing transitions.
For more detailed information, you can refer to the Build an AppKit app with the new design (17:30) session.

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.

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.