---
title: contentHuggingElements
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionlayoutlistconfiguration-swift.struct/contenthuggingelements-swift.property
---

# contentHuggingElements

A setting that determines which type of items tightly hug their content.

## Declaration

```swift
var contentHuggingElements: UICollectionLayoutListConfiguration.ContentHuggingElements { get set }
```

## Discussion

Discussion The default value of this property is supplementaryHeader in visionOS, and [] on all other platforms. When the value of this property is supplementaryHeader, header views tightly hug their content. This means header views don’t stretch to fill the width of the collection view if its content’s intrinsic content size is less than the collection view’s width.

## See Also

### Managing content-hugging behavior

- [UICollectionLayoutListConfiguration.ContentHuggingElements](uikit/uicollectionlayoutlistconfiguration-swift.struct/contenthuggingelements-swift.struct.md)
