CompactMenuControlGroupStyle

A control group style that presents its content as a compact menu when the user presses the control, or as a submenu when nested within a larger menu

CompactMenuControlGroupStyle - iOS Light Mode Preview

Platform Compatibility

iOS 16.4+ iPadOS 16.4+ macOS 13.3+ visionOS 1.0+

Tags

SwiftUI Code

Docs
 VStack {
            ControlGroup {
                Button("Increase", systemImage: "plus", action: action)
                Button("Decrease", systemImage: "minus", action: action)
            } label: {
                Text("Foo")
            }
            ControlGroup("Foo", systemImage: "magnifyingglass") {
                Button("Increase", systemImage: "plus", action: action)
                Button("Decrease", systemImage: "minus", action: action)
            }
            ControlGroup {
               Button("Increase", systemImage: "plus", action: action)
                Button("Decrease", systemImage: "minus", action: action)
            }
        }
        .controlGroupStyle(.compactMenu)

Found an issue or have a suggestion?

Created: June 4, 2025Updated: June 4, 2025