<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "tvOS: 18.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TabContent/disabled(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10TabContentPAAE8disabledyQrSbF"
  },
  "title" : "disabled(_:)"
}
-->

# disabled(_:)

Controls whether users can interact with this tab.

```
nonisolated func disabled(_ disabled: Bool) -> some TabContent<Self.TabValue>
```

## Parameters

`disabled`

A Boolean value that determines whether users can
interact with this tab.

## Discussion

The following example shows a [`TabView`](/documentation/SwiftUI/TabView) with one tab that is not
selectable.

```
TabView {
    Tab("Home", systemImage: "house") {
        HomeView()
    }
    Tab("Alerts", systemImage: "bell") {
        AlertsView()
    }
    .disabled(alertsDisabled)
}
```

---

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)