---
title: NSCollectionLayoutSupplementaryItem
framework: appkit
role: symbol
role_heading: Class
path: appkit/nscollectionlayoutsupplementaryitem
---

# NSCollectionLayoutSupplementaryItem

An object used to add an extra visual decoration to an item in a collection view.

## Declaration

```swift
class NSCollectionLayoutSupplementaryItem
```

## Overview

Overview You use supplementary items to attach additional views to your content. For example, you might attach a badge to an item or a frame around a group. A supplementary item follows the index path of the item it’s attached to. If you want to create a header or footer for your layout or its sections, use a boundary supplementary item (<````NSCollectionLayoutBoundarySupplementaryItem``>) instead. Each type of supplementary 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 supplementary items to an item by passing in an array of supplementary items when you construct the item:

## Topics

### Creating a supplementary item

- [init(layoutSize:elementKind:containerAnchor:)](appkit/nscollectionlayoutsupplementaryitem/init(layoutsize:elementkind:containeranchor:).md)
- [init(layoutSize:elementKind:containerAnchor:itemAnchor:)](appkit/nscollectionlayoutsupplementaryitem/init(layoutsize:elementkind:containeranchor:itemanchor:).md)

### Getting the anchors

- [itemAnchor](appkit/nscollectionlayoutsupplementaryitem/itemanchor.md)
- [containerAnchor](appkit/nscollectionlayoutsupplementaryitem/containeranchor.md)

### Getting the element kind

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

### Specifying stacking order

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

## Relationships

### Inherits From

- [NSCollectionLayoutItem](appkit/nscollectionlayoutitem.md)

### Inherited By

- [NSCollectionLayoutBoundarySupplementaryItem](appkit/nscollectionlayoutboundarysupplementaryitem.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)

## See Also

### Appearance

- [NSCollectionLayoutBoundarySupplementaryItem](appkit/nscollectionlayoutboundarysupplementaryitem.md)
- [NSCollectionLayoutDecorationItem](appkit/nscollectionlayoutdecorationitem.md)
- [NSCollectionLayoutAnchor](appkit/nscollectionlayoutanchor.md)
