hwo to get glassy nav bar items in swiftui

Asked on 06/11/2025

1 search

To achieve a glassy appearance for navigation bar items in SwiftUI, you can utilize the new design system introduced in iOS 26 and iOS Tahoe, which includes a material called Liquid Glass. This material is designed to create a dynamic and fluid appearance that adapts to the content underneath.

Here are some steps and tips based on the WWDC sessions:

  1. Use the New Design System: The new design system automatically applies a glassy appearance to navigation containers, such as sidebars and toolbars, when you recompile your app with the latest SDKs. This is part of the updates in SwiftUI and UIKit.

  2. Liquid Glass Effect: You can apply the Liquid Glass effect to your custom UI elements using the Glass Effect ID modifier. This allows you to create a fluid and morphing appearance for your navigation items.

  3. Toolbar and Navigation Updates: In the session Build a SwiftUI app with the new design, it is explained how toolbars and navigation bars have been updated to use Liquid Glass, providing a more compact and fluid appearance.

  4. Custom Views: For custom views, you can use the gloss effect modifier to add a glassy appearance. This is detailed in the session Build a SwiftUI app with the new design.

  5. Best Practices: It's recommended to avoid overusing Liquid Glass to prevent a cluttered interface. Use it primarily for navigation elements that float above the content.

For a comprehensive guide on implementing these features, you can refer to the session Build a SwiftUI app with the new design.