iOS 26/27 SwiftUI — how to get the “search as a tab” morph (tabs collapse left + search field at the bottom) with a separated search tab?
07:43 16 Jun 2026

I'm building a SwiftUI app on Xcode 26/27 (beta), targeting iOS 26 / iOS 27, and I want the exact “search as a tab” behavior that Apple's own apps use (Phone, News, Health, Music): a search tab that is visually detached on the trailing side of the Liquid Glass tab bar, and when tapped, the other tabs collapse to the left while the search field slides in at the bottom of the screen (taking the place of the tab bar), with the keyboard appearing.

What's supposed to work (WWDC “search as a tab”):

TabView {
Tab("Home", systemImage: "house") { HomeView() }
Tab("Ranking", systemImage: "medal") { RankingView() }
Tab(role: .search) {
NavigationStack {
SearchView()
}
}
}
.searchable(text: $query)

On iOS 26 this gives the separated, morphing search tab as expected.

My problem on iOS 27:

On my iOS 27 build, Tab(role: .search) is not visually separated — it stays glued to the other tabs.

I found the separation fix in a StackOverflow answer, not in the Apple documentation (am I blind? I genuinely cannot find it documented): on iOS 27 there's the new TabRole.prominent:

Tab("Search", systemImage: "magnifyingglass", value: .search, role: .prominent) {
NavigationStack { SearchView() }
}
This correctly detaches the tab to the right.
But now I lose the search behavior: with .prominent, .searchable just renders a normal search field at the top (under the nav bar). I can push it to the bottom bar with:
.searchable(text: $query)
.toolbar { DefaultToolbarItem(kind: .search, placement: .bottomBar) }

…but that's only a static bottom search field. I don't get the morph — the tabs collapsing to the left and the field expanding in place of the tab bar (like the Phone app).

Question

On iOS 27, how do I get both:

  1. the search tab visually separated (which apparently requires .prominent), and

  2. the native “search as a tab” morph (other tabs collapse left + search field replaces the tab bar at the bottom + keyboard), which seems to only happen with role: .search?

Are .search (for the morph) and .prominent (for the separation) mutually exclusive on iOS 27? Is there an API I'm missing to make a role: .search tab reliably separate on iOS 27, or to trigger the morph with .prominent?

Environment: Xcode 27 beta · iOS 27 simulator + device · deployment target iOS 26.

ios swift xcode swiftui