---
title: highlightState
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionviewitem/highlightstate-swift.property
---

# highlightState

The highlight state currently applied to the item.

## Declaration

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

## Discussion

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 and NSCollectionViewItem.HighlightState.forSelection states, but other states may be applied to indicate transient conditions. For example, the NSCollectionViewItem.HighlightState.forDeselection state is applied during interactive selections when a currently selected item is about to be deselected.

## See Also

### Managing the Selection and Highlight States

- [isSelected](appkit/nscollectionviewitem/isselected.md)
