<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/MenuBarExtra/init(content:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12MenuBarExtraV7content5labelACyxq_Gq_yXE_xyXEtcfc"
  },
  "title" : "init(content:label:)"
}
-->

# init(content:label:)

Creates a menu bar extra that will be displayed in the system menu bar,
and defines the primary scene of an `App`.

```
nonisolated init(@ContentBuilder content: () -> Content, @ContentBuilder label: () -> Label)
```

## Parameters

`content`

A `View` to display when the user selects the item.

`label`

A `View` to use as the label in the system menu bar.

## Discussion

When this item is removed from the system menu bar by the user,
the application will be automatically quit. As such, it should not be
used in conjunction with other scene types in your `App`.

---

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)