toolbar to populate items and toolbarVisibility to show or hide whole bars.
Pair toolbar with ToolbarItem for individually-placed items or ToolbarItemGroup when several items share a placement.
toolbar
Populates the toolbar with items, typically used inside aNavigationStack.
ToolbarItem | ToolbarItemGroup | Group | (ToolbarItem | ToolbarItemGroup)[]
required
The toolbar content. Can be a single item, a group, or an array of items.
Typically used inside a NavigationStack to place items in the navigation bar. Use ToolbarItem for individually-placed items and ToolbarItemGroup when multiple items share the same placement.
toolbarVisibility
Controls the visibility of system toolbars."visible" | "hidden" | "automatic"
required
Whether the toolbar is visible, hidden, or determined automatically by the system.
ToolbarBarPlacement | ToolbarBarPlacement[]
Which toolbars to affect (e.g.,
"navigationBar", "tabBar", "bottomBar"). When omitted, applies to all toolbars.See also
- ToolbarItem — single toolbar item
- ToolbarItemGroup — grouped toolbar items
- Navigation chrome — title and back button modifiers
- NavigationStack — navigation container
- ToolbarItemPlacement — placement options