---
title: "LazyGridLayoutInfo"
description: "Contains useful information about the currently displayed layout state of lazy grids like
[LazyVerticalGrid]. For example you can get the list of currently displayed items.

Use [LazyGridState.layoutInfo] to retrieve this"
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
sealed interface LazyGridLayoutInfo
```


Contains useful information about the currently displayed layout state of lazy grids like
`LazyVerticalGrid`. For example you can get the list of currently displayed items.

Use `LazyGridState.layoutInfo` to retrieve this


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val visibleItemsInfo: List<LazyGridItemInfo>
```


The list of `LazyGridItemInfo` representing all the currently visible items.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val viewportStartOffset: Int
```


The start offset of the layout's viewport in pixels. You can think of it as a minimum offset
which would be visible. Usually it is 0, but it can be negative if non-zero
`beforeContentPadding` was applied as the content displayed in the content padding area is
still visible.

You can use it to understand what items from `visibleItemsInfo` are fully visible.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val viewportEndOffset: Int
```


The end offset of the layout's viewport in pixels. You can think of it as a maximum offset
which would be visible. It is the size of the lazy grid layout minus `beforeContentPadding`.

You can use it to understand what items from `visibleItemsInfo` are fully visible.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val totalItemsCount: Int
```


The total count of items passed to `LazyVerticalGrid`.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val viewportSize: IntSize
```


The size of the viewport in pixels. It is the lazy grid layout size including all the content
paddings.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val orientation: Orientation
```


The orientation of the lazy grid.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val reverseLayout: Boolean
```


True if the direction of scrolling and layout is reversed.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val beforeContentPadding: Int
```


The content padding in pixels applied before the first row/column in the direction of
scrolling. For example it is a top content padding for LazyVerticalGrid with reverseLayout
set to false.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val afterContentPadding: Int
```


The content padding in pixels applied after the last row/column in the direction of
scrolling. For example it is a bottom content padding for LazyVerticalGrid with reverseLayout
set to false.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val mainAxisItemSpacing: Int
```


The spacing between lines in the direction of scrolling.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val maxSpan: Int
```


The max line span an item can occupy. This will be the number of columns in vertical grids or
the number of rows in horizontal grids.

For example if `LazyVerticalGrid` has 3 columns this value will be 3 for each cell.




