---
title: scrollDirection
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionviewflowlayout/scrolldirection
---

# scrollDirection

The scroll direction of the grid.

## Declaration

```swift
var scrollDirection: UICollectionView.ScrollDirection { get set }
```

## Discussion

Discussion The grid layout scrolls along one axis only, either horizontally or vertically. For the non scrolling axis, the width of the collection view in that dimension serves as starting width of the content. The default value of this property is UICollectionView.ScrollDirection.vertical.

## See Also

### Configuring the scroll direction

- [UICollectionView.ScrollDirection](uikit/uicollectionview/scrolldirection.md)
