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

# init(_:id:content:)

Creates a window with a title and an identifier.

## Declaration

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

## Parameters

- `title`: The doc://com.apple.SwiftUI/documentation/SwiftUI/Text view to use for the window’s title in system menus and in the window’s title bar. Provide a title that describes the purpose of the window.
- `id`: A unique string identifier that you can use to open the window.
- `content`: The view content to display in the window.

## Discussion

Discussion The window displays the view that you specify. important: The system ignores any text styling that you apply to the 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.
