<!--
{
  "availability" : [
    "macOS: 10.15.1 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewDiffableDataSource-axww/ItemProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:6AppKit34NSCollectionViewDiffableDataSourceC12ItemProvidera"
  },
  "title" : "NSCollectionViewDiffableDataSource.ItemProvider"
}
-->

# NSCollectionViewDiffableDataSource.ItemProvider

A closure that configures and returns an item for a collection view from its diffable data source.

```
typealias ItemProvider = (NSCollectionView, IndexPath, ItemIdentifierType) -> NSCollectionViewItem?
```

## Parameters

`collectionView`

The collection view to configure this item for.

`indexPath`

The index path that specifies the location of the item in the collection view.

`itemIdentifier`

The identifier of the data item for this item.

## Return Value

A non-`nil` configured item object. The item provider must return a valid item object to the collection view.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)