tabViewBottomAccessory

Places a view as the bottom accessory of the tab view.

View ModifieriOS 26.0+

Overloads

2 ways to call compose().tabViewBottomAccessory(). Each is one SwiftUI overload, picked by the arguments you pass.

React
compose().tabViewBottomAccessory({
  content: ReactNode,
})
Swift
nonisolated func tabViewBottomAccessory<Content>(
    @ContentBuilder content: () -> Content
) -> some View
where Content : View

Parameters

  • options.content*ReactNode

Discussion

On iPhone, the placement of the bottom accessory depends on the tab bar size: when the tab bar is normal size, the accessory appears above it; when the tab bar is collapsed, the accessory displays inline. Use the EnvironmentValues.tabViewBottomAccessoryPlacement environment value to adjust the accessory's content based on its placement.

The following example sets a status view as the TabView bottom accessory.

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

    Tab("Alerts", systemImage: "bell") {
        AlertsView()
    }

    TabSection("Categories") {
        Tab("Climate", systemImage: "fan") {
            ClimateView()
        }

        Tab("Lights", systemImage: "lightbulb") {
            LightsView()
        }
    }
}
.tabViewBottomAccessory {
    HomeStatusView()
}

See also

More in Navigation.