Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Applying the `.prominent` modifier to a toolbar action

Hi y'all!

I'm creating an iOS app with SwiftUI. Part of the app's layout will have a toolbar.

Per the HIG's Toolbar article, under the section titled "Actions", the primary action in the toolbar should use the .prominent modifier.

Unfortunately, I'm having issues finding information about this modifier in the SwiftUI reference documentation, and Xcode's code completion (the standard completions; I don't use the language model version) doesn't reveal anything that seems to be usable to create the desired effect.

For reference, this is what the view currently looks like:

VStack {
}
  .toolbar {
    ToolbarItem(placement: .topBarTrailing) {
      Button("Add Something", systemImage: "plus") {
        print("perform action")
      }
    }
  }

Is this modifier added to the button itself as .buttonStyle(.borderedProminent)? This seems to create an odd off-center layout shift in the Xcode preview, the Simulator, and my physical device. Is it added to the toolbar item with a similarly-named modifier?

Thanks all! :)

The current workout is to use ButtonStyle .borderedProminent, it seems like some Liquid Glass APIs are missing in the Beta 1 SDK.

Applying the `.prominent` modifier to a toolbar action
 
 
Q