---
title: "horizontal(layoutSize:subitems:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/nscollectionlayoutgroup/horizontal(layoutsize:subitems:)"
---

# horizontal(layoutSize:subitems:)

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

## Declaration

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

## Parameters

- `layoutSize`: The group’s size.
- `subitems`: The subitems to include.

## See Also

### Creating a horizontal group

- [horizontal(layoutSize:repeatingSubitem:count:)](uikit/nscollectionlayoutgroup/horizontal(layoutsize:repeatingsubitem:count:).md)
