# PagerLayoutInfo

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/pager/PagerLayoutInfo.kt+class:androidx.compose.foundation.pager.PagerLayoutInfo) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0) Common/All
- Cmn

  ```
  sealed interface PagerLayoutInfo
  ```

*** ** * ** ***

Contains useful information about the currently displayed layout state of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)`. This information is available after the first measure pass.

Use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerState#layoutInfo()` to retrieve this

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#afterContentPadding()` The content padding in pixels applied after the last page in the direction of scrolling. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#beforeContentPadding()` The content padding in pixels applied before the first page in the direction of scrolling. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#beyondViewportPageCount()` Pages to compose and layout before and after the list of visible pages. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Orientation` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#orientation()` The `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` orientation. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#pageSize()` The main axis size of the Pages in this `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PageSize` API in the Pager definition. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#pageSpacing()` The spacing in pixels provided in the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` creation. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#reverseLayout()` True if the direction of scrolling and layout is reversed. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/snapping/SnapPosition` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#snapPosition()` The calculation of how this Pager performs snapping of pages. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#viewportEndOffset()` The end offset of the layout's viewport in pixels. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#viewportSize()` The size of the viewport in pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#viewportStartOffset()` The start offset of the layout's viewport in pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PageInfo>` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#visiblePagesInfo()` A list of all pages that are currently visible in the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` | Cmn |

## Public properties

### afterContentPadding

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val afterContentPadding: Int
```

The content padding in pixels applied after the last page in the direction of scrolling. For example it is a bottom content padding for `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/VerticalPager.composable#VerticalPager(androidx.compose.foundation.pager.PagerState,androidx.compose.ui.Modifier,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.pager.PageSize,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,kotlin.Boolean,kotlin.Function1,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` with reverseLayout set to false.

### beforeContentPadding

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val beforeContentPadding: Int
```

The content padding in pixels applied before the first page in the direction of scrolling. For example it is a top content padding for `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/VerticalPager.composable#VerticalPager(androidx.compose.foundation.pager.PagerState,androidx.compose.ui.Modifier,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.pager.PageSize,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,kotlin.Boolean,kotlin.Function1,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` with reverseLayout set to false.

### beyondViewportPageCount

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.7.0)

```
val beyondViewportPageCount: Int
```

Pages to compose and layout before and after the list of visible pages. This will be coerced between 0 and the page count. This does not include the pages automatically composed and laid out by the pre-fetcher in the direction of the scroll during scroll events.

### orientation

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val orientation: Orientation
```

The `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` orientation.

### pageSize

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val pageSize: Int
```

The main axis size of the Pages in this `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PageSize` API in the Pager definition. This is provided in pixels.

### pageSpacing

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val pageSpacing: Int
```

The spacing in pixels provided in the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` creation.

### reverseLayout

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val reverseLayout: Boolean
```

True if the direction of scrolling and layout is reversed.

### snapPosition

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.7.0)

```
val snapPosition: SnapPosition
```

The calculation of how this Pager performs snapping of pages.

### viewportEndOffset

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
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 list layout minus `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#beforeContentPadding()`.

You can use it to understand what items from `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#visiblePagesInfo()` are fully visible.

### viewportSize

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val viewportSize: IntSize
```

The size of the viewport in pixels. It is the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)` layout size including all the content paddings.

### viewportStartOffset

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
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 `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/PagerLayoutInfo#visiblePagesInfo()` are fully visible.

### visiblePagesInfo

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)

```
val visiblePagesInfo: List<PageInfo>
```

A list of all pages that are currently visible in the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/pager/package-summary#Pager(androidx.compose.ui.Modifier,androidx.compose.foundation.pager.PagerState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,androidx.compose.foundation.gestures.TargetedFlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Int,androidx.compose.ui.unit.Dp,androidx.compose.foundation.pager.PageSize,androidx.compose.ui.input.nestedscroll.NestedScrollConnection,kotlin.Function1,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.snapping.SnapPosition,androidx.compose.foundation.gestures.BringIntoViewSpec,kotlin.Function2)`