---
title: "toolbarMinimizeBehavior(_:for:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/toolbarminimizebehavior(_:for:)"
---

# toolbarMinimizeBehavior(_:for:)

Sets the minimize behavior for the specified bars.

## Declaration

```swift
nonisolated func toolbarMinimizeBehavior(_ behavior: ToolbarMinimizeBehavior, for bars: ToolbarPlacement...) -> some View

```

## Parameters

- `behavior`: The minimize behavior.
- `bars`: The bars to apply the behavior to.

## Discussion

Discussion Use this modifier to enable toolbar minimization in response to scrolling. The supported placement is navigationBar. When the navigation bar minimizes, an integrated top tab bar will also minimize. By default, the safe area adjusts as the navigation bar minimizes. Use toolbarMinimizationSafeAreaAdjustment(_:for:) to customize this. NavigationStack {     ScrollView {         ForEach(0 ..< 50) { index in             Text("\(index)").padding()         }     }     .navigationTitle("Minimizing Title")     .toolbarMinimizeBehavior(.onScrollDown, for: .navigationBar) }

## See Also

### Minimizing a toolbar

- [ToolbarMinimizeBehavior](swiftui/toolbarminimizebehavior.md)
- [toolbarMinimizationSafeAreaAdjustment(_:for:)](swiftui/view/toolbarminimizationsafeareaadjustment(_:for:).md)
- [ToolbarMinimizationSafeAreaAdjustment](swiftui/toolbarminimizationsafeareaadjustment.md)
