<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewItem/highlightState-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionViewItem(py)highlightState"
  },
  "title" : "highlightState"
}
-->

# highlightState

The highlight state currently applied to the item.

```
var highlightState: NSCollectionViewItem.HighlightState { get set }
```

## Discussion

The highlight state provides a visual indication of operations happening to items in the collection view. The highlight state normally toggles between the [`NSCollectionViewItem.HighlightState.none`](/documentation/AppKit/NSCollectionViewItem/HighlightState-swift.enum/none) and [`NSCollectionViewItem.HighlightState.forSelection`](/documentation/AppKit/NSCollectionViewItem/HighlightState-swift.enum/forSelection) states, but other states may be applied to indicate transient conditions. For example, the [`NSCollectionViewItem.HighlightState.forDeselection`](/documentation/AppKit/NSCollectionViewItem/HighlightState-swift.enum/forDeselection) state is applied during interactive selections when a currently selected item is about to be deselected.

---

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)