<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/HeaderMode-swift.enum/firstItemInSection",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit35UICollectionLayoutListConfigurationV10HeaderModeO18firstItemInSectionyA2EmF"
  },
  "title" : "UICollectionLayoutListConfiguration.HeaderMode.firstItemInSection"
}
-->

# UICollectionLayoutListConfiguration.HeaderMode.firstItemInSection

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

```
case firstItemInSection
```

## 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 [`UICollectionLayoutListConfiguration.Appearance.plain`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/Appearance-swift.enum/plain) and [`UICollectionLayoutListConfiguration.Appearance.sidebarPlain`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/Appearance-swift.enum/sidebarPlain) list appearances use pinned headers. If you want to opt into this default pinning behavior, use the [`UICollectionLayoutListConfiguration.HeaderMode.supplementary`](/documentation/UIKit/UICollectionLayoutListConfiguration-swift.struct/HeaderMode-swift.enum/supplementary) 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)