Describes the bar axis behavior of a toolbar item.
Use this with the ``ToolbarContent/axisBehavior(_:)`` modifier to
control which bar axes a toolbar item can appear in.
Members (3)
get · iOS 27.1+
horizontalOnly
TypeScript
static get horizontalOnly(): ToolbarItemAxisBehavior
Swift declaration
static let horizontalOnly: ToolbarItemAxisBehavior
The item only supports horizontal bars. If an item only supports
horizontal bars and no horizontal bars are present, the item is
not shown.
get · iOS 27.1+
verticalPreferred
TypeScript
static get verticalPreferred(): ToolbarItemAxisBehavior
Swift declaration
static let verticalPreferred: ToolbarItemAxisBehavior
The item supports both horizontal and vertical bars, and prefers
a vertical placement when both horizontal and vertical bars are
present.
get · iOS 27.1+
automatic
TypeScript
static get automatic(): ToolbarItemAxisBehavior
Swift declaration
static let automatic: ToolbarItemAxisBehavior
The automatic axis behavior.
The system infers the supported axes based on the content type
of the item. Image items support both axes; text and custom view
items support only the horizontal axis.