Contents

ToolbarMinimizeBehavior

The minimize behavior of a toolbar.

Declaration

struct ToolbarMinimizeBehavior

Overview

Use this type with the toolbarMinimizeBehavior(_:for:) modifier to control how toolbars minimize in response to scrolling.

On iOS, you can minimize the navigation bar using onScrollDown or onScrollUp:

NavigationStack {
    ScrollView {
        // ...
    }
    .toolbarMinimizeBehavior(
        .onScrollDown, for: .navigationBar)
}

Topics

Getting behaviors

Type Properties

See Also

Minimizing a toolbar