iPhone SwiftUI layouts
Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.
201elements
Menu
Menu Action Button
Acts like a button and opens the menu on a secondary gesture
Explore Menu Action Button on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
Menu {
Button("Button 1", action: action)
Button("Button 2", systemImage: "button.vertical.left.press", action: action)
Button(action: action) {
Text("Button 3")
Text("Description 3")
}
} label: {
Text("Button 0")
} primaryAction: {
print("Button 0 tapped")
}Compatibility
iOS 15.0+ iPadOS 15.0+ macOS 12+ tvOS 17.0+ visionOS 1.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for Menu Action Button.