---
title: sectionInset
framework: AppKit
role: symbol
role_heading: Instance Property
platforms: [macOS 10.11+]
path: appkit/nscollectionviewflowlayout/1402862-sectioninset
---

# sectionInset

The margins used to lay out content in a section.

## Declaration

```swift
var sectionInset: NSEdgeInsets { get set }
```

## Discussion

If the delegate does not implement the [collectionView(_:layout:insetForSectionAt:)](../nscollectionviewdelegateflowlayout/collectionview(_:layout:insetforsectionat:).md) method, the flow layout object uses the value of this property to set the margins for each section.

Section insets reflect the spacing at the outer edges of the section. The margins affect the positioning of the header view, the minimum space on either side of each line of items, and the distance from the last line to the footer view, as shown in [Figure 1](1402862-sectioninset.md). The margin insets do not affect the size of the header and footer views in the nonscrolling direction.

![]()

The default insets are all set to `0`.

## See Also

### Configuring the Item Spacing

- [minimumLineSpacing](minimumlinespacing.md)
- [minimumInteritemSpacing](minimuminteritemspacing.md)
- [estimatedItemSize](estimateditemsize.md)
- [itemSize](itemsize.md)
