<!--
{
  "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/View/defaultTabBarPlacement(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE22defaultTabBarPlacementyQrAA09AdaptableefG0VF"
  },
  "title" : "defaultTabBarPlacement(_:)"
}
-->

# defaultTabBarPlacement(_:)

Specifies the preferred placement for the tabs of a [`TabView`](/documentation/SwiftUI/TabView)
in the [`sidebarAdaptable`](/documentation/SwiftUI/TabViewStyle/sidebarAdaptable) style on platforms where
the tab bar cannot adapt between different representations, and
only one representation can be shown.

```
nonisolated func defaultTabBarPlacement(_ defaultPlacement: AdaptableTabBarPlacement) -> some View
```

## Discussion

On platforms that support adapting between a sidebar and tab bar
(currently iPadOS), use
[`defaultAdaptableTabBarPlacement(_:)`](/documentation/SwiftUI/View/defaultAdaptableTabBarPlacement(_:)) to configure the
adaptable tab bar.

This modifier is effective on platforms where the
[`sidebarAdaptable`](/documentation/SwiftUI/TabViewStyle/sidebarAdaptable) style statically resolves to
either a sidebar or tab bar, such as iPhone, macOS, tvOS, and
visionOS. On iPadOS (where the bar is adaptable), this modifier
has no effect.

The following example shows a `TabView` that prefers to display
a sidebar on platforms where the bar cannot morph:

```
TabView {
    Tab("Home", systemImage: "house") {
        HomeView()
    }

    Tab("Favorites", systemImage: "star") {
        FavoritesView()
    }
}
.tabViewStyle(.sidebarAdaptable)
.defaultTabBarPlacement(.sidebar)
```

---

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)