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

# init(_:content:)

Creates a disclosure group, using a provided localized string key to create a text view for the label.

## Declaration

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

## Parameters

- `titleKey`: The key for the localized label of self that describes the content of the disclosure group.
- `content`: The content shown when the disclosure group expands.

## See Also

### Creating a disclosure group

- [init(content:label:)](swiftui/disclosuregroup/init(content:label:).md)
- [init(_:isExpanded:content:)](swiftui/disclosuregroup/init(_:isexpanded:content:).md)
- [init(isExpanded:content:label:)](swiftui/disclosuregroup/init(isexpanded:content:label:).md)
