---
title: NSCollectionLayoutDecorationItem
framework: uikit
role: symbol
role_heading: Class
path: uikit/nscollectionlayoutdecorationitem
---

# NSCollectionLayoutDecorationItem

An object used to add a background to a section of a collection view.

## Declaration

```swift
@MainActor class NSCollectionLayoutDecorationItem
```

## Overview

Overview Each type of decoration item must have a unique element kind. Consider tracking these strings together in a way that makes it straightforward to identify each element, for example: Add a background to a section by setting that section’s decorationItems property:

## Topics

### Creating a background

- [background(elementKind:)](uikit/nscollectionlayoutdecorationitem/background(elementkind:).md)

### Getting the element kind

- [elementKind](uikit/nscollectionlayoutdecorationitem/elementkind.md)

### Specifying stacking order

- [zIndex](uikit/nscollectionlayoutdecorationitem/zindex.md)

## Relationships

### Inherits From

- [NSCollectionLayoutItem](uikit/nscollectionlayoutitem.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)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Appearance

- [NSCollectionLayoutAnchor](uikit/nscollectionlayoutanchor.md)
- [NSCollectionLayoutSupplementaryItem](uikit/nscollectionlayoutsupplementaryitem.md)
- [NSCollectionLayoutBoundarySupplementaryItem](uikit/nscollectionlayoutboundarysupplementaryitem.md)
