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

# NSCollectionLayoutDecorationItem

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

## Declaration

```swift
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:)](appkit/nscollectionlayoutdecorationitem/background(elementkind:).md)

### Getting the element kind

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

### Specifying stacking order

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

## Relationships

### Inherits From

- [NSCollectionLayoutItem](appkit/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

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