<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EnvironmentValues/isTabViewSidebarAvailable",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesVAAE25isTabViewSidebarAvailableSbvp"
  },
  "title" : "isTabViewSidebarAvailable"
}
-->

# isTabViewSidebarAvailable

A Boolean value that indicates whether a tab sidebar is available
within the content of a surrounding [`TabView`](/documentation/SwiftUI/TabView).

```
var isTabViewSidebarAvailable: Bool { get }
```

## Discussion

This value is only meaningful inside the content views of a
[`TabView`](/documentation/SwiftUI/TabView) that uses a sidebar-capable style such as
[`sidebarAdaptable`](/documentation/SwiftUI/TabViewStyle/sidebarAdaptable). Reading it from a view that is
not nested inside a `TabView`’s content — for example, a view
above the `TabView` in the hierarchy — returns `false`.

```
struct ContentView: View {
    var body: some View {
        TabView {
            Tab("Home", systemImage: "house") {
                HomeTab()
            }
        }
        .tabViewStyle(.sidebarAdaptable)
    }
}

struct HomeTab: View {
    @Environment(\.isTabViewSidebarAvailable)
    private var isTabViewSidebarAvailable

    var body: some View {
        if isTabViewSidebarAvailable {
            // Sidebar is (or can become) visible — adjust UI.
        } else {
            // No sidebar in this context.
        }
    }
}
```

Use this value to gate behaviors or UI that depend on the
sidebar’s availability, rather than inspecting size classes
directly.

---

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)