TabView Bottom Accessory Placement

A placement of the bottom accessory in a tab view. You can use this to adjust the content of the accessory view based on the placement

TabView Bottom Accessory Placement - iOS Light Mode Preview

Platform Compatibility

iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+

Tags

SwiftUI Code

Docs
var body: some View {
  TabView {
    Tab("1", systemImage: "1.circle") {
      List {
        ForEach(0 ..< 100, id: \.self) {
          Text("Item \($0)")
        }
      }
    }

    Tab("2", systemImage: "2.circle") {
      EmptyView()
    }

    Tab("3", systemImage: "3.circle") {
      EmptyView()
    }
  }
  .tabBarMinimizeBehavior(.onScrollDown)
    .tabViewBottomAccessory {
    AccessoryContent()
  }
}

struct AccessoryContent: View {
  @Environment(\.tabViewBottomAccessoryPlacement) var placement

  var body: some View {
    switch placement {
      case .inline:
      Text("Inline")
      case .expanded:
      Text("Expanded")
      case .none:
      Text("")
    }
  }
}

Found an issue or have a suggestion?

Created: June 10, 2025Updated: July 9, 2025