<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionView/ScrollPosition/nearestHorizontalEdge",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSCollectionViewScrollPosition@NSCollectionViewScrollPositionNearestHorizontalEdge"
  },
  "title" : "nearestHorizontalEdge"
}
-->

# nearestHorizontalEdge

Scroll so that the bounding box is adjacent to the nearest edge (top or bottom) of the collection view. This option must not be combined with the [`top`](/documentation/AppKit/NSCollectionView/ScrollPosition/top), [`centeredVertically`](/documentation/AppKit/NSCollectionView/ScrollPosition/centeredVertically), or [`bottom`](/documentation/AppKit/NSCollectionView/ScrollPosition/bottom) options, but may be combined with other options.

```
static var nearestHorizontalEdge: NSCollectionView.ScrollPosition { get }
```

---

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)