Are there SwiftUI APIs for getting the corner radius of the device or the window on macOS?
Asked on 2025-07-10
1 search
Yes, there are SwiftUI APIs that help with corner radius management, particularly in the context of maintaining concentricity with the container's corners. This is referred to as "corner concentricity," where elements like buttons align their corners with the corners of their container, such as a sheet or window. To achieve this, you can use a concentric rectangle shape and pass the container concentric configuration to the corner parameter. This ensures that the corners of your UI elements are aligned with the corners of their containers, providing a consistent and harmonious design.
For more details, you can refer to the session Build a SwiftUI app with the new design (16:20).

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.

Tailor macOS windows with SwiftUI
Make your windows feel tailor-made for macOS. Fine-tune your app’s windows for focused purposes, ease of use, and to express functionality. Use SwiftUI to style window toolbars and backgrounds. Arrange your windows with precision, and make smart decisions about restoration and minimization.

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.