One Logo Pool Ball
SwiftUI · IOS API REFERENCE

ToolbarDefaultItemKind

struct · iOS 17.0+ · SDK 27.1

struct ToolbarDefaultItemKind

A kind of toolbar item a `View` adds by default. `View`s can add toolbar items clients may wish to remove or customize. A default item kind can be passed to the ``View/toolbar(removing:)`` modifier to remove the item. Documentation on the `View` placing the default item should reference the `ToolbarDefaultItemKind` used to remove the item.

Members (3)

get · iOS 17.0+

sidebarToggle

TypeScript
static get sidebarToggle(): ToolbarDefaultItemKind
Swift declaration
static let sidebarToggle: ToolbarDefaultItemKind

The sidebar toggle toolbar item a `NavigationSplitView` adds by default.

get · iOS 18.0+

title

TypeScript
static get title(): ToolbarDefaultItemKind
Swift declaration
static let title: ToolbarDefaultItemKind

The title and subtitle shown in title bar / navigation bar.

get · iOS 26.0+

search

TypeScript
static get search(): ToolbarDefaultItemKind
Swift declaration
static let search: ToolbarDefaultItemKind

The search item added by a ``View/searchable(text:isPresented:placement:prompt:)`` modifier. Use a `.search` default item kind with ``DefaultToolbarItem/init(kind:placement:)`` to customize the ``ToolbarItemPlacement`` of a default item kind. The search default item kind can be placed in the ``ToolbarItemPlacement/bottomBar`` on all supported platforms. On iOS, it can also be placed in the top bar.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →