Pocket How
Design and HIG

Liquid Glass in SwiftUI: adopting the iOS 26 design without overdoing it

iOS 26+, iPadOS 26+ (fallbacks for iOS 17+). Intermediate. By Cihat Salik, .

Short answer

Rebuild with the iOS 26 SDK first: standard bars, sheets, menus and controls adopt Liquid Glass on their own. Remove custom bar backgrounds, use the glass button styles and toolbar grouping, and keep glassEffect for a few floating custom controls inside a GlassEffectContainer. UIDesignRequiresCompatibility is ignored once you build for iOS 27.

The problem

Liquid Glass arrived with iOS 26 as a new material for the control layer of the interface: bars, tab bars, sheets, menus and floating buttons. Most teams react in one of two ways. Some leave the app alone and are surprised when their custom navigation bar backgrounds fight the new material. Others wrap every card and row in glassEffect() and end up with an interface that looks like a demo reel. Apple’s own guidance sits between those: let the system components do almost all of the work, remove what gets in their way, and use custom glass sparingly for a handful of floating controls.

There is also a deadline you can no longer push back. The UIDesignRequiresCompatibility Info.plist key, which kept the old look while you built against the iOS 26 SDK, is ignored once you build for iOS 27 or later. If your app still depends on it, the next SDK bump turns Liquid Glass on for you.

Step 1: rebuild and look before you write code

Apple’s adoption guide starts with a plain instruction: build with the latest Xcode and run on the latest OS. Standard components from SwiftUI, UIKit and AppKit pick up the new look on their own. That covers NavigationStack, NavigationSplitView, TabView, toolbar(content:), sheets, popovers, menus, and controls like Button, Toggle, Slider, Stepper, Picker and TextField.

Walk every screen and write down what looks wrong. In practice the list falls into a few buckets:

  • Custom backgrounds on bars. A toolbarBackground colour, an image behind the navigation bar, or a UIKit UINavigationBarAppearance with an opaque fill will sit on top of or underneath the glass and break the scroll edge effect. Apple’s advice is to remove them and let the system decide.
  • Hard-coded control metrics. Controls became rounder and some got taller. Anything you sized with fixed frames to match the iOS 18 look will now be off.
  • Section headers. Lists and forms no longer force uppercase section headers. If you typed headers in all caps, they now show that way. Switch them to title-style capitalization.
  • Sheet edges. Sheets have a larger corner radius and partial-height sheets are inset from the screen edge. Content that hugged the corners now gets clipped or looks cramped.
  • Empty toolbar slots. If you hide a toolbar item by hiding the view inside it, you now get an empty glass capsule. Hide the item itself with hidden(_:) on the toolbar content.

Lists and forms also gained more row height and padding. That is intentional, so resist the urge to squeeze it back.

Step 2: let navigation be the glass layer

Liquid Glass belongs to the topmost layer, the one that holds navigation. Content stays content. The clearest wins come from the standard navigation APIs, most of them iOS 26 additions:

  • Tab(role: .search) marks the search tab, and the system pulls it to the trailing end of the tab bar.
  • tabBarMinimizeBehavior(.onScrollDown) lets the tab bar shrink while people scroll through content.
  • tabViewBottomAccessory(content:) places a view, such as a now-playing strip, above the tab bar. When the bar collapses, the accessory moves inline.
  • .tabViewStyle(.sidebarAdaptable) lets a tab bar become a sidebar on iPad.
  • backgroundExtensionEffect() mirrors and blurs a hero image under a sidebar or inspector, so the layout reads edge to edge.

Here is a tab view that uses those pieces. It compiles on iOS 26 and later.

import SwiftUI

struct RootView: View {
    var body: some View {
        TabView {
            Tab("Library", systemImage: "books.vertical") {
                LibraryView()
            }
            Tab("Activity", systemImage: "chart.bar") {
                ActivityView()
            }
            Tab(role: .search) {
                SearchView()
            }
        }
        .tabViewStyle(.sidebarAdaptable)
        .tabBarMinimizeBehavior(.onScrollDown)
        .tabViewBottomAccessory {
            NowPlayingStrip()
        }
    }
}

LibraryView, ActivityView, SearchView and NowPlayingStrip are your own views.

iOS 27 adds one more tab role. Tab(role: .prominent) gives a single tab its own visual treatment at the trailing end of the bar, the way a cart or compose tab often works in shopping and social apps. Only one tab can have it, and when none does, a search tab may get the prominent look by default. It needs iOS 27, so gate it if you still support iOS 26.

Step 3: group toolbar items instead of styling them

Toolbars on iOS 26 put related items on a shared glass background. Your job is grouping, not decoration. Majid Jabrayilov’s toolbar walkthrough makes a point that is easy to miss: placement now controls appearance. An item in .confirmationAction gets the prominent glass style automatically, so you rarely need tint to make Done stand out. He also notes that toolbar items are moving from text to symbols, so give each button a Label with both a title and an image and let the system choose.

Use ToolbarSpacer (iOS 26) to split groups by function, and sharedBackgroundVisibility(.hidden) (iOS 26) when one item, like a status view, should not share a capsule with its neighbours.

struct EditorScreen: View {
    @Environment(\.dismiss) private var dismiss

    var body: some View {
        NavigationStack {
            EditorCanvas()
                .navigationTitle("Sketch")
                .toolbar {
                    ToolbarItemGroup(placement: .bottomBar) {
                        Button("Undo", systemImage: "arrow.uturn.backward") { }
                        Button("Redo", systemImage: "arrow.uturn.forward") { }
                    }
                    ToolbarSpacer(.fixed, placement: .bottomBar)
                    ToolbarItemGroup(placement: .bottomBar) {
                        Button("Markup", systemImage: "pencil.tip.crop.circle") { }
                        Button("More", systemImage: "ellipsis") { }
                    }
                    ToolbarItem(placement: .confirmationAction) {
                        Button("Done", systemImage: "checkmark") { dismiss() }
                    }
                }
        }
    }
}

Apple’s guide adds two rules worth keeping on a sticky note. Don’t mix text and icons inside one shared background. And give every icon-only item an accessibility label, which Button(_:systemImage:action:) does for you through its title.

iOS 27 adds tools for crowded toolbars, all shown in the WWDC26 “What’s new in SwiftUI” session:

  • visibilityPriority(_:) keeps important items on screen longer as space shrinks. Lower-priority items move into the overflow menu first.
  • ToolbarOverflowMenu holds actions that always live in the overflow menu, whatever the width.
  • toolbarMinimizeBehavior(_:for:) lets the navigation bar get out of the way while people scroll.

The session also notes that iPhone apps can be resized on iOS 27, which makes these priorities matter on iPhone for the first time.

Step 4: buttons get glass from a style

For a button that should look like glass, use a style before you reach for the modifier. SwiftUI has .glass and .glassProminent (both iOS 26), and UIKit has UIButton.Configuration.glass(), .prominentGlass(), .clearGlass() and .prominentClearGlass(). The styles handle press feedback and the way buttons morph into menus.

Gating is the only awkward part, because .buttonStyle takes a concrete type and you can’t pick one with a ternary. Wrap it in a small modifier:

struct PrimaryActionStyle: ViewModifier {
    func body(content: Content) -> some View {
        if #available(iOS 26, *) {
            content.buttonStyle(.glassProminent)
        } else {
            content.buttonStyle(.borderedProminent)
        }
    }
}

extension View {
    func primaryActionStyle() -> some View {
        modifier(PrimaryActionStyle())
    }
}

.borderedProminent is the closest fallback in spirit: filled, tinted with the accent colour, and system-drawn.

Step 5: custom glass, used sparingly

glassEffect(_:in:) (iOS 26) renders a Liquid Glass shape behind a view and applies the material’s foreground treatment to it. By default it uses Glass.regular in a capsule. You can switch to Glass.clear, add a tint with tint(_:), and make it respond to touch with interactive(_:). Glass.identity turns the effect off while keeping the modifier in place, which is handy for toggling.

The rules Apple documents are short and they matter:

  • Apply glassEffect after the modifiers that shape the view’s look, because it captures the content to render.
  • Put several glass views inside one GlassEffectContainer. It renders them together for performance and lets nearby shapes blend and morph. The container’s spacing decides how close two shapes must be before they merge.
  • Use glassEffectID(_:in:) with a @Namespace to morph one shape into another during an animated change. glassEffectUnion(id:namespace:) joins separate views into one capsule at rest.
  • Keep the number of glass effects on screen low. Too many containers, or effects outside any container, cost rendering time.

Here is a floating control cluster with a fallback for iOS 17 and 18:

struct DrawingTools: View {
    @State private var showsEraser = false
    @Namespace private var glass

    var body: some View {
        if #available(iOS 26, *) {
            GlassEffectContainer(spacing: 24) {
                HStack(spacing: 24) {
                    toolButton("pencil.tip", label: "Pencil")
                        .glassEffect(.regular.interactive())
                        .glassEffectID("pencil", in: glass)
                    if showsEraser {
                        toolButton("eraser", label: "Eraser")
                            .glassEffect(.regular.interactive())
                            .glassEffectID("eraser", in: glass)
                    }
                }
            }
        } else {
            HStack(spacing: 24) {
                toolButton("pencil.tip", label: "Pencil")
                if showsEraser {
                    toolButton("eraser", label: "Eraser")
                }
            }
            .padding(8)
            .background(.regularMaterial, in: .capsule)
        }
    }

    private func toolButton(_ symbol: String, label: String) -> some View {
        Button {
            withAnimation { showsEraser.toggle() }
        } label: {
            Image(systemName: symbol)
                .font(.title2)
                .frame(width: 56, height: 56)
        }
        .accessibilityLabel(label)
    }
}

The fallback uses regularMaterial, the closest pre-26 relative. It won’t morph, and it shouldn’t pretend to.

Where glass does not belong

Apple puts it bluntly: overusing the material in custom controls distracts from the content it is meant to elevate. A few places come up again and again in design reviews:

  • List rows, cards and content tiles. They are content. Glass on content makes the whole screen one layer.
  • Glass on glass. Stacking a glass button on a glass bar muddies both. Apple’s guide warns against layering Liquid Glass elements on each other.
  • Text-heavy surfaces. Long reading text on a translucent background loses contrast whenever colourful content scrolls behind it.
  • Custom bars without a scroll edge effect. If you build your own bar, register it with safeAreaBar(edge:alignment:spacing:content:) (iOS 26) so the system blurs content scrolling beneath it. For tuning, scrollEdgeEffectStyle(_:for:) (iOS 26) switches between soft and hard edges.

Sheets are a special case. Natalia Panferova shows that a sheet holding a Form loses its glass look because the form’s opaque background covers it. Her fix is to hide the form background with scrollContentBackground(.hidden) at partial detents and restore it at .large. For pushed destinations inside the sheet, she clears the container with containerBackground(.clear, for: .navigation). This article recommends her approach only for short, settings-style sheets. A long form at full height reads better with the opaque background the system gives it.

Traps worth knowing

Accessibility settings change the material. Reduce Transparency, Increase Contrast and Reduce Motion all alter or remove glass effects, and people can pick a preferred Liquid Glass look in Settings. iOS 27 adds a system slider that adjusts the tint, and Apple’s WWDC26 session says standard glass responds to it on its own. Any colour you put on or under glass needs testing across those settings, which is why Apple asks for custom colours with light, dark and increased-contrast variants.

UIKit custom views behave differently. The guest post on Fatbobman’s blog catalogues bar button items with custom views that size wrongly, draw without colour, or reorder themselves. The practical lesson is to give custom bar views explicit size constraints, prefer system items and groups, and, where a custom view stays broken, host a SwiftUI view in it instead. The same post says an unresolved Stepper keyboard bug is still open on iOS 27, so test steppers near the bottom of forms.

Inactive windows dim on iPad. iPadOS 27 dims icons and text in a window that isn’t active, the way the Mac does. Custom chrome that should follow suit can read the appearsActive environment value.

The compatibility key is a short bridge. UIDesignRequiresCompatibility (iOS 26) is documented as temporary, and the system ignores it for builds targeting the 27 releases. Treat it as time to fix your screens, not as a setting.

Performance is real. Glass samples what is behind it. Profile scroll views that sit under several glass elements, and merge effects into one container when you can.

Checklist

Area Do Minimum OS
Bars Remove custom backgrounds; use system bars iOS 26 look on rebuild
Tabs Tab(role: .search), tabBarMinimizeBehavior, tabViewBottomAccessory iOS 26
Prominent tab Tab(role: .prominent) for one key action iOS 27
Toolbars Group by function, ToolbarSpacer, placement over tint iOS 26
Crowded toolbars visibilityPriority, ToolbarOverflowMenu iOS 27
Buttons .glass, .glassProminent, fallback .bordered / .borderedProminent iOS 26
Custom glass Few views, one GlassEffectContainer, glassEffectID for morphs iOS 26
Custom bars safeAreaBar for the scroll edge effect iOS 26
Compatibility key Plan for it to stop working when you build for iOS 27 iOS 26 only
Testing Light, dark, Reduce Transparency, Increase Contrast, Reduce Motion All

The last row decides whether the work holds up. Glass looks fine on a bright photo in a keynote. Check it over a white document, a dark map and a busy feed, with each accessibility setting on, before you call a screen done.

Sources and further reading

Read next