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

# init(_:isExpanded:content:)

Creates a section with the provided section content.

## Declaration

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

## Parameters

- `titleKey`: The key for the section’s localized title, which describes the contents of the section.
- `isExpanded`: A binding to a Boolean value that determines the section’s expansion state (expanded or collapsed).
- `content`: The section’s content.

## See Also

### Controlling collapsibility

- [init(isExpanded:content:header:)](swiftui/section/init(isexpanded:content:header:).md)
