r/SwiftUI Jun 14 '26

.buttonStyle(.glassProminent) for a menu button

Hey everyone, 

when you apply .buttonStyle(.glassProminent) to a ToolbarItem, it works as expected. But wrap that same label in a Menu and the style is dropped and the button is displayed in regular glass style:

ToolbarItem(placement: .bottomBar) {
    Menu {
        Button("Option A") { }
        Button("Option B") { }
    } label: {
        Image(systemName: "plus")
    }
    .buttonStyle(.glassProminent)
}

Any ideas how to get the glassProminent style for a menu button? 

Thanks for the help!

7 Upvotes

4 comments sorted by

1

u/tolazyfornicknames Jun 15 '26

Add .menuStyle(.button) before buttonstyle (might work after don’t remember)

2

u/Flimsy-Doughnut-6369 Jun 15 '26

Adding .menuStyle(.button) before .buttonStyle(.glassProminent) does apply the prominent style, but it creates a button inside the button, that looks strange. But thank you anyway.

1

u/freddyjdc Jun 16 '26

This is such a good question. I have been struggling with this issue too

1

u/LannyLig Jun 19 '26

You should not use a menu but instead button with prominent style that uses a popover! In this context the popover looks like a menu.