---
title: UICollectionViewCompositionalLayoutConfiguration
framework: uikit
role: symbol
role_heading: Class
path: uikit/uicollectionviewcompositionallayoutconfiguration
---

# UICollectionViewCompositionalLayoutConfiguration

An object that defines scroll direction, section spacing, and headers or footers for the layout.

## Declaration

```swift
@MainActor class UICollectionViewCompositionalLayoutConfiguration
```

## Overview

Overview You use a layout configuration to modify a collection view layout’s default scroll direction, add extra spacing between each section of the layout, and add headers or footers to the entire layout. You can pass in this configuration when creating a UICollectionViewCompositionalLayout, or you can set the configuration property on an existing layout. If you modify the configuration on an existing layout, the system invalidates the layout so that it will be updated with the new configuration.

## Topics

### Specifying scroll direction

- [scrollDirection](uikit/uicollectionviewcompositionallayoutconfiguration/scrolldirection.md)

### Configuring spacing

- [interSectionSpacing](uikit/uicollectionviewcompositionallayoutconfiguration/intersectionspacing.md)
- [contentInsetsReference](uikit/uicollectionviewcompositionallayoutconfiguration/contentinsetsreference.md)
- [UIContentInsetsReference](uikit/uicontentinsetsreference.md)

### Configuring additional views

- [boundarySupplementaryItems](uikit/uicollectionviewcompositionallayoutconfiguration/boundarysupplementaryitems.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Configuration

- [UICollectionViewCompositionalLayoutSectionProvider](uikit/uicollectionviewcompositionallayoutsectionprovider.md)
- [NSCollectionLayoutEnvironment](uikit/nscollectionlayoutenvironment.md)
