<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ToolbarItemAxisBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23ToolbarItemAxisBehaviorV"
  },
  "title" : "ToolbarItemAxisBehavior"
}
-->

# ToolbarItemAxisBehavior

Describes the bar axis behavior of a toolbar item.

```
struct ToolbarItemAxisBehavior
```

## Overview

Use this with the [`axisBehavior(_:)`](/documentation/SwiftUI/ToolbarContent/axisBehavior(_:)) modifier to
control which bar axes a toolbar item can appear in.

## Topics

### Getting behavior options

[`static let automatic: ToolbarItemAxisBehavior`](/documentation/SwiftUI/ToolbarItemAxisBehavior/automatic)

The automatic axis behavior.

[`static let horizontalOnly: ToolbarItemAxisBehavior`](/documentation/SwiftUI/ToolbarItemAxisBehavior/horizontalOnly)

The item only supports horizontal bars. If an item only supports
horizontal bars and no horizontal bars are present, the item is
not shown.

[`static let verticalPreferred: ToolbarItemAxisBehavior`](/documentation/SwiftUI/ToolbarItemAxisBehavior/verticalPreferred)

The item supports both horizontal and vertical bars, and prefers
a vertical placement when both horizontal and vertical bars are
present.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)