<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/MenuStyle/automatic",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9MenuStylePA2A07DefaultcD0VRszrlE9automaticAEvpZ"
  },
  "title" : "automatic"
}
-->

# automatic

The default menu style, based on the menu’s context.

```
@MainActor @export(implementation) @preconcurrency static var automatic: DefaultMenuStyle { get }
```

## Discussion

The default menu style can vary by platform. By default, macOS uses the
bordered button style.

If you create a menu inside a container, the style resolves to the
recommended style for menus inside that container for that specific
platform. For example, a menu nested within another menu will resolve to
a submenu:

```
Menu("Edit") {
    Menu("Arrange") {
        Button("Bring to Front", action: moveSelectionToFront)
        Button("Send to Back", action: moveSelectionToBack)
    }
    Button("Delete", action: deleteSelection)
}
```

You can override a menu’s style. To apply the default style to a menu,
or to a view that contains a menu, use the [`menuStyle(_:)`](/documentation/SwiftUI/View/menuStyle(_:))
modifier.

---

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)