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

# init(_:isExpanded:content:)

Creates a disclosure group, using a provided localized string key to create a text view for the label, and a binding to the expansion state (expanded or collapsed).

## Declaration

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

## Parameters

- `titleKey`: The key for the localized label of self that describes the content of the disclosure group.
- `isExpanded`: A binding to a Boolean value that determines the group’s expansion state (expanded or collapsed).
- `content`: The content shown when the disclosure group expands.

## See Also

### Creating a disclosure group

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