<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DisclosureGroup/init(_:isExpanded:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15DisclosureGroupVA2A4TextVRszrlE_10isExpanded7contentACyAEq_G10Foundation23LocalizedStringResourceV_AA7BindingVySbGq_yctcfc::OverloadGroup"
  },
  "title" : "init(_:isExpanded:content:)"
}
-->

# init(_:isExpanded:content:)

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

```
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, isExpanded: Binding<Bool>, @ContentBuilder content: @escaping () -> Content)
```

## Parameters

`titleResource`

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)