<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TabViewCustomization/TabCustomization/sidebarVisibility",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20TabViewCustomizationV0cE0V17sidebarVisibilityAA0G0Ovp"
  },
  "title" : "sidebarVisibility"
}
-->

# sidebarVisibility

The visibility of the tab in the sidebar.

```
var sidebarVisibility: Visibility { get set }
```

## Discussion

Visibility can be set imperatively by subscripting with the tab’s id:

```
customization[tab: "com.myApp.alerts"].sidebarVisibility = .hidden
```

You can change the default visibility by using
`TabContent/defaultVisibility(_:for)` with a
`AdaptableTabBarPlacement.sidebar` placement.

```
Tab("Alerts", systemImage: "bell", value: .alerts) {
    AlertsView()
}
.customizationID("com.myApp.alerts")
.defaultVisibility(.hidden, for: .sidebar)
```

If the ID isn’t associated with a tab or the tab has not been
customized, a default value of `.automatic` is returned.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)