<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/CommandMenu/init(_:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11CommandMenuV_7contentACyxG10Foundation23LocalizedStringResourceV_xyXEtcfc::OverloadGroup"
  },
  "title" : "init(_:content:)"
}
-->

# init(_:content:)

Creates a new menu with a localized name for a collection of app-
specific commands, inserted in the standard location for app menus
(after the View menu, in order with other menus declared without an
explicit location).

```
@export(implementation) nonisolated init(_ name: LocalizedStringResource, @ContentBuilder content: () -> Content)
```

---

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)