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

# NSCollectionViewSectionHeaderView

A protocol that defines a button to control the collapse of a collection view’s section.

```
protocol NSCollectionViewSectionHeaderView : NSCollectionViewElement
```

## Overview

A collection view can support a section that can collapse into a single horizontally scrollable row, similar to the groupings in the icon view in Finder. To ensure that the collection view can communicate with the button that controls the collapsing of a section, the section header view object should conform to this protocol and connect the button’s outlet to [`sectionCollapseButton`](/documentation/AppKit/NSCollectionViewSectionHeaderView/sectionCollapseButton).

## Topics

### Providing a Collapse Button

[`sectionCollapseButton`](/documentation/AppKit/NSCollectionViewSectionHeaderView/sectionCollapseButton)

A control that lets users collapse and open a collection view section.

## Relationships

### Inherits From

[`NSCollectionViewElement`](/documentation/AppKit/NSCollectionViewElement)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`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)