---
title: "init(content:label:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/menubarextra/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.

## Declaration

```swift
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

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.

## See Also

### Creating a menu bar extra

- [init(_:content:)](swiftui/menubarextra/init(_:content:).md)
- [init(_:isInserted:content:)](swiftui/menubarextra/init(_:isinserted:content:).md)
- [init(isInserted:content:label:)](swiftui/menubarextra/init(isinserted:content:label:).md)
