---
title: "Hide Sidebar Toggle | Explore SwiftUI"
description: "Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples."
canonical_url: "https://exploreswiftui.com/library/navigation/hide-sidebar-toggle"
meta:
  author: "Explore SwiftUI"
  "og:description": "Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Hide%2BSidebar%2BToggle%2Cdescription_Removes%2Bthe%2Bsidebar%2Btoggle%2Btoolbar%2Bitem%2Ba%2BNavigationSplitView%2Badds%2Bby%2Bdefault.%2Ccategory_Navigation%2Cimage_~L2FwaS9pbWFnZXMvMjU1L3ZhcmlhbnRzLzE5MjU~dj0xNzkxMzc3Mzk4ODE4JnI9MiZ3PTY0MCZoPTQ4MCZmPXBuZw%2CimageMode_fit%2CimagePosition_top%2CimageFrame_~Ym9yZGVyLXJhZGl1czogMzNweCAwcHggMHB4IDMzcHg7IGJvcmRlcjogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci1yaWdodDogMDsgYm94LXNoYWRvdzogMCAtMTBweCA1MHB4IHJnYmEoMzcsOTksMjM1LDAuMTgpOw%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L25hdmlnYXRpb24vaGlkZS1zaWRlYmFyLXRvZ2dsZSI%2Cs_OBOqMeh2EcrYaObW.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Hide Sidebar Toggle | Explore SwiftUI"
  "twitter:description": "Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Hide%2BSidebar%2BToggle%2Cdescription_Removes%2Bthe%2Bsidebar%2Btoggle%2Btoolbar%2Bitem%2Ba%2BNavigationSplitView%2Badds%2Bby%2Bdefault.%2Ccategory_Navigation%2Cimage_~L2FwaS9pbWFnZXMvMjU1L3ZhcmlhbnRzLzE5MjU~dj0xNzkxMzc3Mzk4ODE4JnI9MiZ3PTY0MCZoPTQ4MCZmPXBuZw%2CimageMode_fit%2CimagePosition_top%2CimageFrame_~Ym9yZGVyLXJhZGl1czogMzNweCAwcHggMHB4IDMzcHg7IGJvcmRlcjogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci1yaWdodDogMDsgYm94LXNoYWRvdzogMCAtMTBweCA1MHB4IHJnYmEoMzcsOTksMjM1LDAuMTgpOw%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L25hdmlnYXRpb24vaGlkZS1zaWRlYmFyLXRvZ2dsZSI%2Cs_OBOqMeh2EcrYaObW.png"
  "twitter:title": "Hide Sidebar Toggle | Explore SwiftUI"
---

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

**Interactive previews**[ iPhone Duo](https://exploreswiftui.com/duo?element=255) [ iPad](https://exploreswiftui.com/ipad?element=255)

# **Hide Sidebar Toggle**

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

![Hide Sidebar Toggle - Preview Not Available](https://exploreswiftui.com/api/images/255/variants/1925?v=1791377398818&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 17.0+ iPadOS 17.0+ macOS 13.0+ watchOS 10.0+ tvOS 17.0+ visionOS 1.0+

### **Tags**

### **SwiftUI Code**

[ Docs](https://developer.apple.com/documentation/swiftui/toolbardefaultitemkind/sidebartoggle)

```
NavigationSplitView {
    Color.blue
        .toolbar(removing: .sidebarToggle)
} detail: {
    Color.orange
}
```

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

Created: October 7, 2026Updated: October 7, 2026

### **More Navigation Components **

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

![Toolbar Title Alignment - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/258/variants/2111?v=1793542963212&r=2&w=412&q=75&f=webp)

### **Toolbar Title Alignment**

Sets the preferred alignment of the navigation bar’s title. The navigation bar resolves the alignment of its title automatically based on context, and toolbar roles. Use this modifier to override that resolution.

![Preferred Top Column - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/256/variants/1967?v=1791379474964&r=2&w=412&q=75&f=webp)

### **Preferred Top Column**

Controls which column appears on top of the stack when NavigationSplitView collapses into a single stack in certain contexts, such as on iPhone, when iPhone Duo is closed, or on Apple Watch. By default, the sidebar appears on top. In this case, the detail column does instead.

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

### **Content NavigationSplitView**

Creates a three-column navigation split view.

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

### **NavigationSplitView**

Creates a two-column navigation split view.

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

### **Navigation Subtitle**

Configures the view’s subtitle for purposes of navigation, using a localized string

### **Explore Other Components **

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

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

### **ViewThatFits**

A view that adapts to the available space by providing the first child view that fits.

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

### **Multiple Sources Picker**

Creates a picker that updates the selected property for all sources.

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

### **TextFieldLink**

A control that requests text input from the user when pressed

![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

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

### **Tab Bar Section Actions**

Adds custom actions to a tab section.

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

### **Semantic Colors**

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

### **Container Photo Picker**

Limits the Photos picker to only show items in the specified container. In this case, to the user-created album "CustomAlbum".

![Split Arrangement Layout Ratio - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/244/variants/1564?v=1790273511100&r=2&w=412&q=75&f=webp)

### **Split Arrangement Layout Ratio**

Sets the preferred size ratio for an arrangement view in a split style. Use this modifier when you want to customize the size of the view compared to its other views in the split layout.

```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/navigation/hide-sidebar-toggle#webpage","@type":"WebPage","dateModified":"2026-10-07T12:49:58.864Z","datePublished":"2026-10-07T12:42:46.319Z","description":"Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples.","name":"Hide Sidebar Toggle","url":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle","breadcrumb":{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"mainEntity":{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#article"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/navigation/hide-sidebar-toggle"]}],"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/navigation/hide-sidebar-toggle#article","citation":"https://developer.apple.com/documentation/swiftui/toolbardefaultitemkind/sidebartoggle","dateModified":"2026-10-07T12:49:58.864Z","datePublished":"2026-10-07T12:42:46.319Z","description":"Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples.","headline":"Hide Sidebar Toggle","inLanguage":"en-US","name":"Hide Sidebar Toggle","thumbnailUrl":"https://exploreswiftui.com/api/images/255/variants/1925?v=1791377398818&r=2","url":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"hasPart":{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#source-code"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#webpage"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#source-code","@type":"SoftwareSourceCode","codeSampleType":"full example","description":"Removes the sidebar toggle toolbar item a NavigationSplitView adds by default. Learn how to use Hide Sidebar Toggle in SwiftUI with visual code examples.","name":"Hide Sidebar Toggle SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"NavigationSplitView {\n    Color.blue\n        .toolbar(removing: .sidebarToggle)\n} detail: {\n    Color.orange\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"Navigation"},{"@type":"Thing","name":"Hide Sidebar Toggle"}]},{"@id":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"Navigation","item":"https://exploreswiftui.com/library/navigation","position":2},{"@type":"ListItem","name":"Hide Sidebar Toggle","item":"https://exploreswiftui.com/library/navigation/hide-sidebar-toggle","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/255/variants/1925?v=1791377398818&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/255/variants/1925?v=1791377398818&r=2"}]}
```