<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionLayoutGroup/vertical(layoutSize:subitems:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionLayoutGroup(cm)verticalGroupWithLayoutSize:subitems:"
  },
  "title" : "vertical(layoutSize:subitems:)"
}
-->

# vertical(layoutSize:subitems:)

Creates a group of the specified size, containing an array of items arranged in a vertical line.

```
class func vertical(layoutSize: NSCollectionLayoutSize, subitems: [NSCollectionLayoutItem]) -> Self
```

## Parameters

`layoutSize`

The group’s size.

`subitems`

The subitems to include.

## Discussion

---

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)