<!--
{
  "availability" : [
    "macOS: 10.15.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/MenuButton",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10MenuButtonV"
  },
  "title" : "MenuButton"
}
-->

# MenuButton

A button that displays a menu containing a list of choices when pressed.

```
nonisolated struct MenuButton<Label, Content> where Label : View, Content : View
```

## Topics

### Creating a menu button

[`init(_:content:)`](/documentation/SwiftUI/MenuButton/init(_:content:))

Creates a menu button with the specified localized title and content.

[`init(label:content:)`](/documentation/SwiftUI/MenuButton/init(label:content:))

Creates a menu button with the specified label and content.

### Styling a menu button

[`menuButtonStyle(_:)`](/documentation/SwiftUI/View/menuButtonStyle(_:))

Sets the style for menu buttons within this view.

[`MenuButtonStyle`](/documentation/SwiftUI/MenuButtonStyle)

A custom specification for the appearance and interaction of a menu button.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)