---
title: indexPath
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionviewlayoutattributes/indexpath
---

# indexPath

The index path of the element.

## Declaration

```swift
var indexPath: IndexPath? { get set }
```

## Discussion

Discussion Use the index path to locate information about the item in your app’s data structures. For supplementary and decoration views, you must also use the representedElementKind property to identify the element.

## See Also

### Identifying the Element

- [representedElementCategory](appkit/nscollectionviewlayoutattributes/representedelementcategory.md)
- [representedElementKind](appkit/nscollectionviewlayoutattributes/representedelementkind.md)
- [elementKindInterItemGapIndicator](appkit/nscollectionview/elementkindinteritemgapindicator.md)
- [elementKindSectionFooter](appkit/nscollectionview/elementkindsectionfooter.md)
- [elementKindSectionHeader](appkit/nscollectionview/elementkindsectionheader.md)
