---
title: contentHuggingElements
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitableview/contenthuggingelements
---

# contentHuggingElements

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

## Declaration

```swift
var contentHuggingElements: UITableViewContentHuggingElements { get set }
```

## Discussion

Discussion The default value of this property is sectionHeaders for plain-style table views in visionOS, and UITableViewContentHuggingElementsNone on all other platforms. When the value of this property is sectionHeaders, header views tightly hug their content. This means header views don’t stretch to fill the width of the table view if its content’s intrinsic content size is less than the table view’s width.

## See Also

### Managing content-hugging behavior

- [UITableViewContentHuggingElements](uikit/uitableviewcontenthuggingelements.md)
