toolbarOverflowMenu

Configures the overflow menu of a toolbar.

View ModifieriOS 27.0+visionOS 27.0+toolbarOverflowMenu(content:) in SwiftUI

Declaration

React
compose().toolbarOverflowMenu({
  content: ReactNode,
})
Swift
nonisolated func toolbarOverflowMenu<C>(
    @ContentBuilder content: () -> C
) -> some View
where C : View

Parameters

  • options.content*ReactNode

    The content of the overflow menu.

Discussion

An overflow menu represents actions that are always placed in the toolbar's overflow menu, regardless of the toolbar mode, platform, or customizability.

ContentView()
    .toolbarOverflowMenu {
        Button("Action 1") { }
        Button("Action 2") { }
    }

In iOS and visionOS, this content is placed into the overflow menu in the navigation bar.

See also

More in Navigation.