<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/toolbarVerticalBehavior(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE23toolbarVerticalBehavioryQrAA07ToolbareF0VF"
  },
  "title" : "toolbarVerticalBehavior(_:)"
}
-->

# toolbarVerticalBehavior(_:)

Sets the behavior for the vertical bar.

```
nonisolated func toolbarVerticalBehavior(_ behavior: ToolbarVerticalBehavior) -> some View
```

## Parameters

`behavior`

The desired behavior for the vertical bar.

## Discussion

By default, the system determines whether a vertical bar is rendered
based on the device and application state. Use
[`disabled`](/documentation/SwiftUI/ToolbarVerticalBehavior/disabled) to opt out of the vertical bar,
causing bar content to fall back to the standard horizontal top and
bottom toolbars.

Disable the vertical bar only for UIs that are better served by
horizontal bars — such as a fullscreen video player with toolbar
controls, or a non-scrolling layout like a calculator where horizontal
space is at a premium. Treat it as a stable choice: avoid changing it
frequently as the user navigates, and don’t toggle it for a single view
as a function of that view’s state. To hide the bars on a given screen
rather than change the layout, use [`toolbarVisibility(_:for:)`](/documentation/SwiftUI/View/toolbarVisibility(_:for:))
instead.

The behavior is resolved by the window or presentation if placed within
a sheet or form. Different containers resolve their overall preferred
behavior in different ways:

- A [`NavigationStack`](/documentation/SwiftUI/NavigationStack) uses the top most view of its stack of views.
- A [`TabView`](/documentation/SwiftUI/TabView) uses the selected view.
- A [`NavigationSplitView`](/documentation/SwiftUI/NavigationSplitView) uses the view in the trailing-most column.

When the value changes, the system animates the transition: content reflows
to or from the horizontal bars while the status bar changes axis and
the leading or trailing safe area inset for the vertical bar is added
or removed.

```
TabView {
    Tab("Home", systemImage: "house") {
        HomeView()
    }
}
.toolbarVerticalBehavior(.disabled)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)