---
title: horizontalOnly
framework: SwiftUI
role: symbol
role_heading: Type Property
platforms: [iOS 27.1+, iPadOS 27.1+]
path: swiftui/toolbaritemaxisbehavior/horizontalonly
---

# 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.

## Declaration

```swift
static let horizontalOnly: ToolbarItemAxisBehavior
```

## See Also

### Getting behavior options

- [automatic](swiftui/toolbaritemaxisbehavior/automatic.md)
- [verticalPreferred](swiftui/toolbaritemaxisbehavior/verticalpreferred.md)
