---
title: "subscript(sidebarVisibility:)"
framework: swiftui
role: symbol
role_heading: Instance Subscript
path: "swiftui/tabviewcustomization/subscript(sidebarvisibility:)"
---

# subscript(sidebarVisibility:)

The visibility of the tab identified by its customization identifier.

## Declaration

```swift
subscript(sidebarVisibility id: String) -> Visibility { get set }
```

## Overview

Overview Visibility can be set imperatively by subscripting with the tab’s id: customization[sidebarVisibility: "com.myApp.alerts"] = .hidden You can change the default visibility by using the defaultVisibility(_:for:) with a 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.
