---
title: "collapsible(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/section/collapsible(_:)"
---

# collapsible(_:)

Sets whether a section can be collapsed by the user.

## Declaration

```swift
func collapsible(_ collapsible: Bool) -> some View

```

## Discussion

Discussion This modifier only applies to sections in List views that have the sidebar style.

## See Also

### Deprecated symbols

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