> Documentation index: https://developer.android.com/reference/llms.txt

# LazyStaggeredGridDefaults

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/lazy/staggeredgrid/LazyStaggeredGridDefaults.kt+class:androidx.compose.foundation.lazy.staggeredgrid.LazyStaggeredGridDefaults) Added in [1.13.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation.md.txt#1.13.0) Common/All
- Cmn

  ```
  object LazyStaggeredGridDefaults
  ```

*** ** * ** ***

Contains the default values used by `LazyVerticalStaggeredGrid` and `LazyHorizontalStaggeredGrid`.

## Summary

| ### Public functions |
|---|---|---|
| `LazyLayoutCacheWindow` | `@Composable cacheWindow(state: LazyStaggeredGridState)` Creates and remembers the default `LazyLayoutCacheWindow` for `LazyVerticalStaggeredGrid` and `LazyHorizontalStaggeredGrid`. | Cmn |

## Public functions

### cacheWindow

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

```
@Composable
fun cacheWindow(state: LazyStaggeredGridState): LazyLayoutCacheWindow
```

Creates and remembers the default `LazyLayoutCacheWindow` for `LazyVerticalStaggeredGrid` and `LazyHorizontalStaggeredGrid`.

- Prefetches items ahead in the scroll direction based on the average size of visible items from `state`, clamped between 10% and 50% of the viewport.

- Does not retain items behind the viewport.

- Does not cache while the user is not scrolling.

| Parameters |
|---|---|
| `state: LazyStaggeredGridState` | the `LazyStaggeredGridState` used to calculate the average visible item size |

| Returns |
|---|---|
| `LazyLayoutCacheWindow` | the default `LazyLayoutCacheWindow` |