<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DisclosureGroup/init(_:isExpanded:content:)-8ki39",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15DisclosureGroupVA2A4TextVRszrlE_10isExpanded7contentACyAEq_GAA18LocalizedStringKeyV_AA7BindingVySbGq_yctcfc"
  },
  "title" : "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).

```
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.

---

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)