<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionLayoutListHeaderMode/UICollectionLayoutListHeaderModeFirstItemInSection",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration Case",
  "symbol" : {
    "kind" : "Enumeration Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UICollectionLayoutListHeaderMode@UICollectionLayoutListHeaderModeFirstItemInSection"
  },
  "title" : "UICollectionLayoutListHeaderModeFirstItemInSection"
}
-->

# UICollectionLayoutListHeaderModeFirstItemInSection

A header mode that styles the first item in a section as a header.

```
UICollectionLayoutListHeaderModeFirstItemInSection
```

## Discussion

Choose this header mode when you’re using hierarchical data sources if you want to be able to expand and collapse the header.

When you use this header mode, a [`UICollectionViewListCell`](/documentation/UIKit/UICollectionViewListCell) object that appears as the first item in the section automatically uses a header appearance. When you configure your data source, make sure to account for the fact that the first item in the section (at index `0`) represents the header, and the actual items in the section start at index `1`.

By default, lists that use the [`UICollectionLayoutListAppearancePlain`](/documentation/UIKit/UICollectionLayoutListAppearance/UICollectionLayoutListAppearancePlain) and [`UICollectionLayoutListAppearanceSidebarPlain`](/documentation/UIKit/UICollectionLayoutListAppearance/UICollectionLayoutListAppearanceSidebarPlain) list appearances use pinned headers. If you want to opt into this default pinning behavior, use the [`UICollectionLayoutListHeaderModeSupplementary`](/documentation/UIKit/UICollectionLayoutListHeaderMode/UICollectionLayoutListHeaderModeSupplementary) header mode instead.

---

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)