---
title: "Search Tab Role | Explore SwiftUI"
description: "On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView"
canonical_url: "https://exploreswiftui.com/library/tabview/search-tab-role"
meta:
  author: "Explore SwiftUI"
  "og:description": "On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView"
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Search%2BTab%2BRole%2Cdescription_~T24gTGlxdWlkIEdsYXNzLCB0aGlzIHRhYiBpcyBwbGFjZWQgaW4gaXRzIG93biBncm91cC4gSW4gbGVmdC10by1yaWdodCAoTFRSKSBsYXlvdXRzLCBpdCB3aWxsIGFsd2F5cyBhcHBlYXIgb24gdGhlIHJpZ2h0IHNpZGUgb2YgdGhlIFRhYlZpZXcu%2Ccategory_TabView%2Cimage_~L2FwaS9pbWFnZXMvMTYzL3ZhcmlhbnRzLzY2Mz92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_bottom%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiAwOyBib3JkZXItYm90dG9tOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogNzRweDs%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L3RhYnZpZXcvc2VhcmNoLXRhYi1yb2xlIg%2Cs_wz4_Bz8qGgvqkXrj.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Search Tab Role | Explore SwiftUI"
  "twitter:description": "On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView"
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Search%2BTab%2BRole%2Cdescription_~T24gTGlxdWlkIEdsYXNzLCB0aGlzIHRhYiBpcyBwbGFjZWQgaW4gaXRzIG93biBncm91cC4gSW4gbGVmdC10by1yaWdodCAoTFRSKSBsYXlvdXRzLCBpdCB3aWxsIGFsd2F5cyBhcHBlYXIgb24gdGhlIHJpZ2h0IHNpZGUgb2YgdGhlIFRhYlZpZXcu%2Ccategory_TabView%2Cimage_~L2FwaS9pbWFnZXMvMTYzL3ZhcmlhbnRzLzY2Mz92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_bottom%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiAwOyBib3JkZXItYm90dG9tOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogNzRweDs%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L3RhYnZpZXcvc2VhcmNoLXRhYi1yb2xlIg%2Cs_wz4_Bz8qGgvqkXrj.png"
  "twitter:title": "Search Tab Role | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=163)

# **Search Tab Role**

On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView.

![Search Tab Role - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/163/variants/663?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 18.0+ iPadOS 18.0+ macOS 15.0+ watchOS 11.0+ tvOS 18.0+ visionOS 2.0+

### **Tags**

### **SwiftUI Code**

[ Docs](https://developer.apple.com/documentation/swiftui/tabrole/search)

```
TabView {
    Tab {
        EmptyView()
    }
    Tab("1", systemImage: "1.circle", role: .search) {
        EmptyView()
    }

    Tab("2", image: "cats24x24") {
        EmptyView()
    }
    Tab {
        EmptyView()
    } label: {
        Label("3", systemImage: "3.circle")
    }
}
```

### **Found an issue or have a suggestion?**

Created: April 11, 2026Updated: April 11, 2026

### **More TabView Components **

[**View all **](https://exploreswiftui.com/library/tabview)

![Collapse Sidebar Sections by Default - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/259/variants/2039?v=1792566366133&r=2&w=412&q=75&f=webp)

### **Collapse Sidebar Sections by Default**

Collapses the section in the sidebar by default.

![Default Tab Bar Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/239/variants/2069?v=1792681374978&r=2&w=412&q=75&f=webp)

### **Default Tab Bar Placement**

Specifies the preferred placement for the tabs of a TabView in the sidebarAdaptable style on platforms where the tab bar cannot adapt between different representations, and only one representation can be shown. For example, on iOS, it can enforce the sidebar on large-screen devices like the Pro Max, and iPhone Duo. This modifier has no effect on iPadOS.

![Default Collapsed Tab Section - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/234/variants/341?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Default Collapsed Tab Section**

Sets the default expansion state for the section containing this tab to collapsed when displayed in the sidebar.

![Tab View Customization Behavior - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/166/variants/669?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Customization Behavior**

Configures the customization behavior of customizable tab view content.

![Tab View Customization - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/164/variants/671?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Customization**

Specifies the customizations to apply to the sidebar representation of the tab view.

![Tab View Side Bar Footer - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/168/variants/735?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Side Bar Footer**

Adds a custom footer to the sidebar of a tab view.

![Tab View Side Bar Bottom Bar - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/169/variants/707?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Side Bar Bottom Bar**

Adds a custom bottom bar to the sidebar of a tab view.

![Default Adaptable Tab Bar Placement - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/170/variants/673?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Default Adaptable Tab Bar Placement**

Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.

### **Explore Other Components **

[**Browse all **](https://exploreswiftui.com/)

![ControlSize - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/97/variants/303?v=1790073478842&r=2&w=412&q=75&f=webp)

### **ControlSize**

A control version that is the default size

![Custom Photo Picker Buttons - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/265/variants/2235?v=1794910823065&r=2&w=412&q=75&f=webp)

### **Custom Photo Picker Buttons**

Sets the primary and secondary button types of the Photos picker.

![Error Alert - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/196/variants/325?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Error Alert**

Presents an alert when an error is present.

![Capsule Text Field - macOS - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/240/variants/186?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Capsule Text Field**

Gives your text field a capsule shape. This only has a visible effect on macOS, where the capsule shape is not the default.

![Hide Sidebar Toggle - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/255/variants/1925?v=1791377398818&r=2&w=412&q=75&f=webp)

### **Hide Sidebar Toggle**

Removes the sidebar toggle toolbar item a NavigationSplitView adds by default.

![ArrangementView - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/243/variants/1530?v=1790273526551&r=2&w=412&q=75&f=webp)

### **ArrangementView**

Creates an arrangement view with a primary and secondary view.

![UIKit Text Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/12/variants/55?v=1790073478842&r=2&w=412&q=75&f=webp)

### **UIKit Text Colors**

The UIKit text colors that are also used in other components, such as the TextField

![On Primary Photos Picker Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/267/variants/2251?v=1794910789851&r=2&w=412&q=75&f=webp)

### **On Primary Photos Picker Action**

Sets the primary action handler for the Photos picker.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#webpage","@type":"WebPage","dateModified":"2026-04-11T13:31:36.220Z","datePublished":"2026-04-11T09:04:50.880Z","description":"On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView","name":"Search Tab Role","url":"https://exploreswiftui.com/library/tabview/search-tab-role","breadcrumb":{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"mainEntity":{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#article"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/tabview/search-tab-role"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#article","citation":"https://developer.apple.com/documentation/swiftui/tabrole/search","dateModified":"2026-04-11T13:31:36.220Z","datePublished":"2026-04-11T09:04:50.880Z","description":"On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView","headline":"Search Tab Role","inLanguage":"en-US","name":"Search Tab Role","thumbnailUrl":"https://exploreswiftui.com/api/images/163/variants/663?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/tabview/search-tab-role","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"hasPart":{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#source-code"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#webpage"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#source-code","@type":"SoftwareSourceCode","codeSampleType":"full example","description":"On Liquid Glass, this tab is placed in its own group. In left-to-right (LTR) layouts, it will always appear on the right side of the TabView","name":"Search Tab Role SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"TabView {\n    Tab {\n        EmptyView()\n    }\n    Tab(\"1\", systemImage: \"1.circle\", role: .search) {\n        EmptyView()\n    }\n\n    Tab(\"2\", image: \"cats24x24\") {\n        EmptyView()\n    }\n    Tab {\n        EmptyView()\n    } label: {\n        Label(\"3\", systemImage: \"3.circle\")\n    }\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"TabView"},{"@type":"Thing","name":"Search Tab Role"}]},{"@id":"https://exploreswiftui.com/library/tabview/search-tab-role#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"TabView","item":"https://exploreswiftui.com/library/tabview","position":2},{"@type":"ListItem","name":"Search Tab Role","item":"https://exploreswiftui.com/library/tabview/search-tab-role","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/163/variants/663?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/163/variants/663?v=1790073478842&r=2"}]}
```