---
title: ToolbarItemVisibilityPriority
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/toolbaritemvisibilitypriority
---

# ToolbarItemVisibilityPriority

A value that defines the visibility priority of a toolbar item.

## Declaration

```swift
struct ToolbarItemVisibilityPriority
```

## Overview

Overview When a toolbar runs out of space, it moves items into an overflow menu. Visibility priority controls the order in which that happens: items with a lower priority move first, keeping higher-priority items visible longer as the window shrinks. Use values of this type with the visibilityPriority(_:) modifier. For example, to keep a share button visible longer than an archive button: struct RootView: View {     var body: some View {         ContentView()             .toolbar {                 ToolbarItem {                     SecondaryControl()                 }                 ToolbarItem {                     PrimaryControl()                 }                 .visibilityPriority(.high)             }     } }

## Topics

### Getting system priorities

- [automatic](swiftui/toolbaritemvisibilitypriority/automatic.md)
- [low](swiftui/toolbaritemvisibilitypriority/low.md)
- [high](swiftui/toolbaritemvisibilitypriority/high.md)

### Creating custom priorities

- [init(lowerThan:)](swiftui/toolbaritemvisibilitypriority/init(lowerthan:).md)
- [init(higherThan:)](swiftui/toolbaritemvisibilitypriority/init(higherthan:).md)

## Relationships

### Conforms To

- [Comparable](swift/comparable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Controlling item visibility

- [visibilityPriority(_:)](swiftui/toolbarcontent/visibilitypriority(_:).md)
