<h2 id="snaplayoutinfoprovider-state">SnapLayoutInfoProvider</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun SnapLayoutInfoProvider(state: ListState): SnapLayoutInfoProvider
```

List snapping aligns the focus line with the center of the closest item. Combined with adaptive
scrolling, this ensures that users have to move the same distance when swipes between items of
the similar size, resulting in predictable movement.

#### Parameters

| | |
| --- | --- |
| state | The [ListState](/jetpack-compose/androidx.xr.glimmer/glimmer/classes/ListState) to observe for layout and focus information. |

#### Returns

| | |
| --- | --- |
|  | A focus-aware [SnapLayoutInfoProvider](/jetpack-compose/androidx.xr.glimmer/glimmer/functions/SnapLayoutInfoProvider) instance. |