Section(isExpanded:) in sidebar List, inconsistent row animation on collapse/expand

When using Section(_:isExpanded:) inside a List with .listStyle(.sidebar) in a NavigationSplitView, some rows don't animate with the others during collapse and expand. Specific rows (often in the middle of the section) snap in/out instantly while the rest animate smoothly.

I've reproduced this with both static views and ForEach.

Minimal reproduction:

struct SidebarView: View {
    @State private var sectionExpanded = true
    @State private var selection: Int?

    var body: some View {
        NavigationSplitView {
            List(selection: $selection) {
                Section("Section", isExpanded: $sectionExpanded) {
                    ForEach(1...3, id: \.self) { index in
                        NavigationLink(value: index) {
                            Label("Item \(index)", systemImage: "\(index).circle")
                        }
                    }
                }
            }
            .listStyle(.sidebar)
            .navigationTitle("Sidebar")
        } detail: {
            if let selection {
                Text("Selected item \(selection)")
            } else {
                Text("Select an item")
            }
        }
    }
}

Environment: macOS 26.3, Xcode 26.3, SwiftUI

Steps to reproduce:

  1. Run the above code in a macOS app
  2. Click the section disclosure chevron to collapse
  3. Observe that some rows animate out while others snap instantly
  4. Expand again — same inconsistency

Expected: All rows animate together uniformly.

Actual: Some rows (typically middle items) skip the animation entirely.

I also tried using static Label views instead of ForEach, same result. Is there a known workaround?

Thanks for your post.

This is interesting. 🧐

Do you mind filing a report using Feedback Assistant that I can share with the relevant engineering team?

Share as much details as you can about affected platforms and versions. I would love to know if this started happening with a specific update or has always been there.

As for workarounds, you can try handling the animation directly instead of letting it be handled implicitly or "under the hood". For example, you can disable the animation entirely with .animation(.none, value: sectionExpanded) or create your own custom Section with a dropdown and animating content.

You can also build the sidebar content in AppKit and display it with SwiftUI using NSViewControllerRepresentable

Once complete, reply with the FB number below. Thank you.

 Travis

FB22318519

I have not tested against earlier versions so I cannot confirm whether this is a regression or has always been there.

Thanks :)

Section(isExpanded:) in sidebar List, inconsistent row animation on collapse/expand
 
 
Q