Choppy minimized search bar animation

The new .searchToolbarBehavior(.minimized) modifier leads to a choppy animation both on device and SwiftUI canvas (iOS 26.2):

I assume this is not the intended behaviour (reported under FB21572657), but since I almost never receive any feedback to my reports, I wanted to see also here, whether you experience the same, or perhaps I use the modifier incorrectly?

struct SwiftUIView: View {
    
    @State var isSearchPresented: Bool = false
    @State var searchQuery: String = ""

    var body: some View {
        TabView {
            Tab {
                NavigationStack {
                    ScrollView {
                                Text(isSearchPresented.description)
                    }
                    .navigationTitle("Test")
                }
                .searchable(text: $searchQuery, isPresented: $isSearchPresented)
                .searchToolbarBehavior(.minimize) // **Choppy animation comes from here?**
            } label: {
                Label("Test", systemImage: "calendar")
            }
            
            Tab {
                Text("123")
            } label: {
                Label("123", systemImage: "globe")
            }
        }
    }
}

#Preview {
    if #available(iOS 26, *) {
        SwiftUIView()
    } else {
        // Fallback on earlier versions
    }
}

Thank you for bringing this issue to our attention. We have received the bug report FB21572657 and the correct team are investigating the animation causing the choppiness.

Please review your implementation of the .searchToolbarBehavior(.minimized) modifier. Ensure it is applied correctly within your view hierarchy and that there are no conflicting modifiers or animations that may be causing the choppiness. Currently, it appears that the modifier is set after another animation. If you remove that line, you can test whether the toolbar minimizes without the choppiness.

To isolate the issue, temporarily simplify the view in which you are applying this modifier. Remove other UI elements or animations and observe whether the choppiness persists. This will help determine if the issue is with the modifier itself or elsewhere in your view.

Temporarily remove the .searchable(text: $searchQuery, isPresented: $isSearchPresented) modifier for testing purposes.

Thanks

Albert Pascual
  Worldwide Developer Relations.

Dear @DTS Engineer,

Thank you for your reply and suggested way forward. I reduced the code to the minimum for further testing purposes:

struct SwiftUIView: View {
    @State var searchQuery: String = ""

    var body: some View {
        NavigationStack {
            ScrollView {
                Text("Test")
            }
            .navigationTitle("Test")
        }
        .searchable(text: $searchQuery)
        .searchToolbarBehavior(.minimize)
    }
}

#Preview {
    if #available(iOS 26, *) {
        TabView {
            Tab {
                SwiftUIView()
            } label: {
                Label("Test", systemImage: "calendar")
            }
        }
    } else {
        // Fallback on earlier versions
    }
}

I did not remove .searchable as per your suggestion since without it the .searchToolbarBehavior(.minimize) does not appear to have any effect (the search button is simply not shown).

The code above still leads to the same choppy animation as demonstrated in my initial message.

As further testing, I tried to extract the NavigationStack view to a separate view (similarly to here), and to remove ScrollView or replace it with a List, but to no success.

Hopefully this is helpful.

Choppy minimized search bar animation
 
 
Q