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

# init(_:content:)

Creates a group box with the provided view content and title.

## Declaration

```swift
nonisolated init(_ titleKey: LocalizedStringKey, @ContentBuilder content: () -> Content)
```

## Parameters

- `titleKey`: The key for the group box’s title, which describes the content of the group box.
- `content`: A doc://com.apple.SwiftUI/documentation/SwiftUI/ContentBuilder that produces the content for the group box.

## See Also

### Creating a group box

- [init(content:)](swiftui/groupbox/init(content:).md)
- [init(content:label:)](swiftui/groupbox/init(content:label:).md)
