---
title: contentInsets
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/nscollectionlayoutitem/contentinsets
---

# contentInsets

The amount of space added around the content of the item to adjust its final size after its position is computed.

## Declaration

```swift
var contentInsets: NSDirectionalEdgeInsets { get set }
```

## Discussion

Discussion You can use this property within a grid layout to apply even spacing around each edge of each item. Content insets are applied after applying edgeSpacing. The following diagram shows the result of applying 2 points of content insets to each edge of each item in a group.

note: The value of this property is ignored for any axis that uses an estimated value for its dimension. For more information, see estimated(_:).

## See Also

### Configuring spacing and insets

- [edgeSpacing](uikit/nscollectionlayoutitem/edgespacing.md)
