<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "tvOS: 14.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 7.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WindowGroup/init(_:id:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11WindowGroupV_2id7contentACyxGAA4TextV_SSxyXEtcfc::OverloadGroup"
  },
  "title" : "init(_:id:content:)"
}
-->

# init(_:id:content:)

Creates a window group with a text view title and an identifier.

```
nonisolated init(_ title: Text, id: String, @ContentBuilder content: () -> Content)
```

## Parameters

`title`

The [`Text`](/documentation/SwiftUI/Text) view to use for the group’s title.

`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

The window group uses the specified content as a
template to create each window in the group.
The system uses the title to distinguish the window group in the user
interface, such as in the name of commands associated with the group.

> Important: The system ignores any text styling that you apply to
> the ``doc://com.apple.SwiftUI/documentation/SwiftUI/Text`` view title, like bold or italics. However, you can use
> the formatting controls that the view offers, like for localization,
> dates, and numerical representations.

---

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)