TabBarMinimizeBehavior

A behavior that determines when a tab bar minimizes.

StructureiOS 26.0+macOS 26.0+tvOS 26.0+watchOS 26.0+visionOS 26.0+TabBarMinimizeBehavior in SwiftUI

Declaration

React
type TabBarMinimizeBehavior = 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
Swift
struct TabBarMinimizeBehavior

Pass a literal, or build one with SwiftUI.TabBarMinimizeBehavior from import { SwiftUI } from 'swiftui-react-native'.

Type properties

Overview

A minimized tab bar becomes smaller so that the content behind it has more room. Pass a value of this type to the View.tabBarMinimizeBehavior(_:) modifier to specify the behavior.

The following example minimizes the tab bar as soon as someone scrolls down through a feed, and restores it when they scroll back up:

TabView {
    Tab("Feed", systemImage: "list.bullet") {
        FeedView()
    }

    Tab("Profile", systemImage: "person") {
        ProfileView()
    }
}
.tabBarMinimizeBehavior(.onScrollDown)

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Navigation.