Title Toolbar Item Placement
Places content in the title area
Platform Compatibility
Tags
SwiftUI Code
NavigationStack {
Text("Foo")
.toolbar {
ToolbarItem(placement: .largeTitle) {
Text("1")
}
ToolbarItem(placement: .title) {
Text("2")
}
ToolbarItem(placement: .subtitle) {
Text("3")
}
ToolbarItem(placement: .largeSubtitle) {
Text("4")
}
}
}Found an issue or have a suggestion?
More Toolbars Components
View allPrefer Vertical Toolbar Items
A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.
Toolbar Overflow Menu
The overflow menu of a toolbar. An overflow menu represents actions that are always placed in the toolbar’s overflow menu, regardless of the toolbar mode, platform, or customizability.
Pinned Toolbar Item Placement
A placement that pins the item to the trailing edge of the toolbar.
ToolbarItem Shared Background Visibility
Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping
Explore Other Components
Browse allDisclosure Group
A view that shows or hides another content view, based on the state of a disclosure control.
Hidden Index PageTabViewStyle
A TabViewStyle that displays a paged scrolling TabView with a hidden index.
Default Adaptable Tab Bar Placement
Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.
Background Extension Effect
Adds the background extension effect to the view. The view will be duplicated into mirrored copies which will be placed around the view on any edge with available safe area. Additionally, a blur effect will be applied on top to blur out the copies