---
title: "tabViewSidebarHeader(content:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/tabviewsidebarheader(content:)"
---

# tabViewSidebarHeader(content:)

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

## Declaration

```swift
nonisolated func tabViewSidebarHeader<Content>(@ContentBuilder content: () -> Content) -> some View where Content : View

```

## Discussion

Discussion The header appears at the top of the sidebar before any tab labels and can scroll with the content. The header is only visible when the TabView is displaying the sidebar. The following example adds a welcome message to the top of the sidebar: TabView {     Tab("Home", systemImage: "house") {         HomeView()     }

Tab("Alerts", systemImage: "bell") {         AlertsView()     }

Tab("Browse", systemImage: "list.bullet") {         MyBrowseView()     } } .tabViewStyle(.sidebarAdaptable) .tabViewSidebarHeader {     WelcomeHeaderView() } note: To have a sidebar, aTabView needs the sidebarAdaptable style.

## See Also

### Configuring a tab bar

- [defaultAdaptableTabBarPlacement(_:)](swiftui/view/defaultadaptabletabbarplacement(_:).md)
- [defaultTabBarPlacement(_:)](swiftui/view/defaulttabbarplacement(_:).md)
- [tabViewSidebarFooter(content:)](swiftui/view/tabviewsidebarfooter(content:).md)
- [tabViewSidebarBottomBar(content:)](swiftui/view/tabviewsidebarbottombar(content:).md)
- [AdaptableTabBarPlacement](swiftui/adaptabletabbarplacement.md)
- [tabBarPlacement](swiftui/environmentvalues/tabbarplacement.md)
- [TabBarPlacement](swiftui/tabbarplacement.md)
- [isTabBarShowingSections](swiftui/environmentvalues/istabbarshowingsections.md)
- [tabBarMinimizeBehavior(_:)](swiftui/view/tabbarminimizebehavior(_:).md)
- [TabBarMinimizeBehavior](swiftui/tabbarminimizebehavior.md)
- [TabViewBottomAccessoryPlacement](swiftui/tabviewbottomaccessoryplacement.md)
