---
title: "init(id:content:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/windowgroup/init(id:content:)"
---

# init(id:content:)

Creates a window group with an identifier.

## Declaration

```swift
nonisolated init(id: String, @ContentBuilder content: () -> Content)
```

## Parameters

- `id`: A string that uniquely identifies the window group. Identifiers must be unique among the window groups in your app.
- `content`: A closure that creates the content for each instance of the group.

## Discussion

Discussion The window group uses the given view as a template to form the content of each window in the group.

## See Also

### Identifying a window group

- [init(_:id:content:)](swiftui/windowgroup/init(_:id:content:).md)
