<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionLayoutVisibleItem",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSCollectionLayoutVisibleItem"
  },
  "title" : "NSCollectionLayoutVisibleItem"
}
-->

# NSCollectionLayoutVisibleItem

An item that’s currently visible within the bounds of a section.

```
@MainActor protocol NSCollectionLayoutVisibleItem : NSObjectProtocol
```

## Overview

A visible item represents an item in a collection view that’s currently visible onscreen, such as a cell, supplementary view, or decoration. You access a specific section’s visible items in its visible item invalidation handler ([`NSCollectionLayoutSectionVisibleItemsInvalidationHandler`](/documentation/AppKit/NSCollectionLayoutSectionVisibleItemsInvalidationHandler)), stored in the [`visibleItemsInvalidationHandler`](/documentation/AppKit/NSCollectionLayoutSection/visibleItemsInvalidationHandler) property. The handler is called before each layout cycle, any time an animation occurs in that section due to changes such as adding or removing items, scrolling the section, or rotating the device.

## Topics

### Identifying the item

[`var name: String`](/documentation/AppKit/NSCollectionLayoutVisibleItem/name)

The name of the item.

[`var representedElementKind: String?`](/documentation/AppKit/NSCollectionLayoutVisibleItem/representedElementKind)

A string that identifies the type of item.

[`var representedElementCategory: NSCollectionElementCategory`](/documentation/AppKit/NSCollectionLayoutVisibleItem/representedElementCategory)

A category that identifies the item, such as decoration or supplementary view.

### Getting the index path

[`var indexPath: IndexPath`](/documentation/AppKit/NSCollectionLayoutVisibleItem/indexPath)

The index path of the item.

### Configuring appearance

[`var alpha: CGFloat`](/documentation/AppKit/NSCollectionLayoutVisibleItem/alpha)

The transparency of the item.

[`var isHidden: Bool`](/documentation/AppKit/NSCollectionLayoutVisibleItem/isHidden)

A Boolean value that determines whether the item is hidden.

### Configuring position

[`var frame: NSRect`](/documentation/AppKit/NSCollectionLayoutVisibleItem/frame)

The frame rectangle, which describes the item’s location and size in its section’s coordinate system.

[`var bounds: NSRect`](/documentation/AppKit/NSCollectionLayoutVisibleItem/bounds)

The bounds rectangle, which describes the item’s location and size in its own coordinate system.

[`var center: NSPoint`](/documentation/AppKit/NSCollectionLayoutVisibleItem/center)

The center point of the item’s frame rectangle.

### Specifying stacking order

[`var zIndex: Int`](/documentation/AppKit/NSCollectionLayoutVisibleItem/zIndex)

The vertical stacking order of the item in relation to other items in the section.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)