How to show/hide iOS toolbar buttons with fancy Liquid Glass animation?
13:00 23 Mar 2026

I'm building an iOS 26+ SwiftUI app featuring Liquid Glass and conditional buttons that appear in certain scenarios.

For example, a Trash toolbar button that appears when then a textfield has text, but disappears when the textfield is empty:

if !text.isEmpty {
    ToolbarItem(placement: .topBarTrailing) {
        Button { text = "" } label: { Image(systemName: "trash") }
    }
}

I want the toolbar buttons to appear and disappear using Apple's fancy new Liquid Glass blob morphing effects.

However the above code simply immediately shows/hides the toolbar button with no apparent "liquid, flowing, morphing" animation as shown in the Apple video.

toolbar item

Note: Tapping the button does add some Liquid Glass effect, but when the button is shown/hidden via unrelated actions it simply blinks in and out of existence.

Is there a way to add a toolbar button using stock, native iOS animations so that it gets the fancy shrinking morphing Liquid Glass appearance and disappearance?

The question here has gifs showing both the simple animation and fancy Liquid Glass animation when switching/adding buttons, but not for showing/hiding a button set completely.

ios swiftui uitoolbar ios26 liquid-glass