SwiftUI Search Enhancements in iOS and iPadOS 26

In iOS and iPadOS 26, the search experience has been updated with new placement behaviors and visual styling, and we also have new SwiftUI APIs to support the changes. In this post, we'll explore how we can take advantage of these enhancements to build search interfaces that feel modern and consistent with the system.

We'll focus on two common search patterns in iOS apps: search in the toolbar and search in the tab bar, and review how each works, what has changed, and how to implement them in SwiftUI.

In apps that use hierarchical navigation with NavigationStack or NavigationSplitView, it's common to enable global search by applying the searchable() modifier to the entire navigation view.

NavigationSplitView {
    List(notes, selection: $selectedNote) { note in
        NavigationLink(note.title, value: note)
    }
    .navigationTitle("Notes")
} detail: {
    NoteDetailView(note: selectedNote)
}
.searchable(text: $searchText)

Applying searchable() to the navigation container instead of an individual column allows the system to determine the appropriate placement for the search field.

In earlier versions of iOS and iPadOS, this setup would place the search field at the top of the sidebar on iPad and at the top of the root view on iPhone. Starting with iOS 26, the same configuration results in a search field presented in a Liquid Glass container, positioned in the top trailing corner of the window on iPad, and at the bottom of the screen on iPhone for easier reach.

iPad and iPhone side-by-side showing a notes app using NavigationSplitView, with the search field appearing in the top trailing corner on iPad and at the bottom of the screen on iPhone

We can still explicitly position the search field in the sidebar on iPad if that better suits our app by specifying the sidebar placement in the searchable() modifier.

NavigationSplitView {
    List(filteredNotes, selection: $selectedNote) { note in
        NavigationLink(note.title, value: note)
    }
    .navigationTitle("Notes")
} detail: {
    NoteDetailView(note: selectedNote)
}
.searchable(text: $searchText, placement: .sidebar)

This restores the previous behavior, placing the search field at the top of the sidebar column instead of using the new floating style.

iPad showing a notes app with the search field expanded in the sidebar and a search query entered

For applications where search is scoped to the detail content rather than applied globally, we should attach the searchable() modifier directly to the detail view.

NavigationSplitView {
    List(notes, selection: $selectedNote) { note in
        NavigationLink(note.title, value: note)
    }
    .navigationTitle("Notes")
} detail: {
    NoteDetailView(note: selectedNote)
        .searchable(text: $searchText)
}

This placement has also been updated with the new design in iOS and iPadOS 26. On iPad, the search field now appears prominently above the detail content, while on iPhone it adopts the new bottom-aligned position.

iiPad and iPhone showing the same selected note with the search field above the content on iPad and at the bottom of the screen on iPhone
Swift Gems by Natalia Panferova book coverSwift Gems by Natalia Panferova book cover

Level up your Swift skills!$35

100+ tips to take your Swift code to the next level

Swift Gemsby Natalia Panferova

  • Advanced Swift techniques for experienced developers bypassing basic tutorials
  • Curated, actionable tips ready for immediate integration into any Swift project
  • Strategies to improve code quality, structure, and performance across all platforms

Level up your Swift skills!

100+ tips to take your Swift code to the next level

Swift Gems by Natalia Panferova book coverSwift Gems by Natalia Panferova book cover

Swift Gems

by Natalia Panferova

$35

When the detail view includes other bottom toolbar items on iPhone, and we want the search field to still appear at the bottom, we can use two new toolbar content types introduced in iOS 26: DefaultToolbarItem with the search kind, and ToolbarSpacer.

NoteDetailView(note: selectedNote)
    .toolbar {
        if #available(iOS 26.0, *) {
            DefaultToolbarItem(kind: .search, placement: .bottomBar)
            ToolbarSpacer(.flexible, placement: .bottomBar)
        }
        ToolbarItem(placement: .bottomBar) {
            NewNoteButton()
        }
    }
    .searchable(text: $searchText)

This ensures that the search field is allocated space in the bottom toolbar layout and remains visually separated from the other toolbar items.

iPhone displaying a note with the search field in the bottom toolbar and a compose button on the right iPhone displaying a note with the search field in the bottom toolbar and a compose button on the right

If search isn't the primary experience we want to promote in our app, we can use the new SwiftUI modifier searchToolbarBehavior() to minimize the search field into a toolbar button. The system may also apply this behavior automatically based on factors such as device size or the number of toolbar items.

extension View {
    @ViewBuilder func minimizedSearch() -> some View {
        if #available(iOS 26.0, *) {
            self.searchToolbarBehavior(.minimize)
        } else { self }
    }
}

struct NotesView: View {
    ...
    
    var body: some View {
        NavigationSplitView {
            ...
        } detail: {
            NoteDetailView(note: selectedNote)
                .toolbar {
                    if #available(iOS 26.0, *) {
                        DefaultToolbarItem(kind: .search, placement: .bottomBar)
                        ToolbarSpacer(.flexible, placement: .bottomBar)
                    }
                    ToolbarItem(placement: .bottomBar) {
                        NewNoteButton()
                    }
                }
                .searchable(text: $searchText)
                .minimizedSearch()
        }
    }
}
iPhone displaying a note with the search button in the bottom leading corner and the compose button in the bottom trailing corner iPhone displaying a note with the search button in the bottom leading corner and the compose button in the bottom trailing corner

In apps that use tab-based navigation, it’s common to place search in a dedicated tab where users can browse suggestions or enter queries directly. This pattern appears in many Apple apps such as Health, Music, and Books. To adopt it, we create a Tab with the search role and apply the searchable() modifier to the TabView. For the search field to appear and function correctly, the contents of the search tab should be wrapped in a NavigationStack.

TabView {
    Tab("Library", systemImage: "books.vertical") {
        LibraryView()
    }
    Tab("Book Store", systemImage: "bag") {
        StoreView()
    }
    
    Tab(role: .search) {
        NavigationStack {
            SearchView()
                .navigationTitle("Search")
        }
    }
}
.searchable(text: $searchText)

With the new Liquid Glass tab bar design in iOS 26, the search tab appears visually separated from the others and transforms into a search field when selected.

Two iPhones showing a books app, the Library tab displays a grid of book titles, while the Search tab shows categorized book lists with a bottom-aligned search field

On iPadOS 26, the search field in the search tab appears at the top center of the screen, above the browsing suggestions.

TiPad showing the Search tab of a books app with the search field centered at the top of the screen and categorized book lists displayed below

Just like with other standard system components, adopting the new Liquid Glass design for search doesn’t require much effort. By taking advantage of the updates to standard search patterns and adjusting behavior to suit our app’s needs, we can ensure that our search experience feels at home on iOS and iPadOS 26.


If you're looking to build a strong foundation in SwiftUI, my new book SwiftUI Fundamentals takes a deep dive into the framework’s core principles and APIs to help you understand how it works under the hood and how to use it effectively in your projects.

For more resources on Swift and SwiftUI, check out my other books and book bundles.

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

Deepen your understanding of SwiftUI!$35

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentalsby Natalia Panferova

  • Explore the key APIs and design patterns that form the foundation of SwiftUI
  • Develop a deep, practical understanding of how SwiftUI works under the hood
  • Learn from a former Apple engineer who worked on widely used SwiftUI APIs

Deepen your understanding of SwiftUI!

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

SwiftUI Fundamentals

by Natalia Panferova

$35