# androidx.glance.appwidget.lazy

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope` | Receiver scope being used by the item content parameter of `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyColumn.composable#LazyColumn(androidx.glance.GlanceModifier,androidx.glance.layout.Alignment.Horizontal,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyListScope` | Receiver scope which is used by `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyColumn.composable#LazyColumn(androidx.glance.GlanceModifier,androidx.glance.layout.Alignment.Horizontal,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGridScope` | Receiver scope which is used by `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyColumn.composable#LazyColumn(androidx.glance.GlanceModifier,androidx.glance.layout.Alignment.Horizontal,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/VerticalScrollMode` | Defines what sort of vertical scrolling behavior is used by `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyColumn.composable#LazyColumn(androidx.glance.GlanceModifier,androidx.glance.layout.Alignment.Horizontal,kotlin.Function1)`. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells` | Defines the number of columns of the GridView. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive` | Defines a grid with as many columns as possible on the condition that every cell has at least `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive#(androidx.compose.ui.unit.Dp)` space and all extra space distributed evenly. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Fixed` | Defines a fixed number of columns, limited to 1 through 5. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/VerticalScrollMode.SnapScrollMatchHeight` | Items will snap into place and match the height of the parent view. |

## Objects

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/VerticalScrollMode.Normal` | The default LazyColumn behavior: standard scrolling. |

## Annotations

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyScopeMarker` |   |

## Composables

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyColumn.composable` | A vertical scrolling list that only lays out the currently visible items. |
| `https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGrid.composable` | The DSL implementation of a lazy grid layout. |

## Extension functions summary

|---|---|
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyListScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyListScope).items(kotlin.Array,kotlin.Function1,kotlin.Function2)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>, noinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds an array of items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGridScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyVerticalGridScope).items(kotlin.Array,kotlin.Function1,kotlin.Function2)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>, noinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds an array of items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyListScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyListScope).items(kotlin.collections.List,kotlin.Function1,kotlin.Function2)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>, crossinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a list of items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGridScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyVerticalGridScope).items(kotlin.collections.List,kotlin.Function1,kotlin.Function2)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>, crossinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a list of items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyListScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyListScope).itemsIndexed(kotlin.Array,kotlin.Function2,kotlin.Function3)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>, noinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a array of items where the content of an item is aware of its index. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGridScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyVerticalGridScope).itemsIndexed(kotlin.Array,kotlin.Function2,kotlin.Function3)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>, noinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a array of items where the content of an item is aware of its index. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyListScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyListScope).itemsIndexed(kotlin.collections.List,kotlin.Function2,kotlin.Function3)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>, crossinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a list of items where the content of an item is aware of its index. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyVerticalGridScope.https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/package-summary#(androidx.glance.appwidget.lazy.LazyVerticalGridScope).itemsIndexed(kotlin.collections.List,kotlin.Function2,kotlin.Function3)( items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>, crossinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a list of items where the content of an item is aware of its index. |

## Extension functions

### LazyListScope.items

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyList.kt+function:items) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

```
inline fun <T : Any?> LazyListScope.items(
    items: Array<T>,
    noinline itemId: (item) -> Long = { LazyListScope.UnspecifiedItemId },
    crossinline itemContent: @Composable LazyItemScope.(item) -> Unit
): Unit
```

Adds an array of items.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` | the data array |
| `noinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { LazyListScope.UnspecifiedItemId }` | a factory of stable and unique list item ids. Using the same itemId for multiple items in the array is not allowed. When you specify the itemId, the scroll position will be maintained based on the itemId, which means if you add/remove items before the current visible item the item with the given itemId will be kept as the first visible one. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyVerticalGridScope.items

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyVerticalGrid.kt+function:items) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

```
inline fun <T : Any?> LazyVerticalGridScope.items(
    items: Array<T>,
    noinline itemId: (item) -> Long = { LazyVerticalGridScope.UnspecifiedItemId },
    crossinline itemContent: @Composable LazyItemScope.(item) -> Unit
): Unit
```

Adds an array of items.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` | the data array |
| `noinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { LazyVerticalGridScope.UnspecifiedItemId }` | a factory of stable and unique list item ids. Using the same itemId for multiple items in the array is not allowed. When you specify the itemId, the scroll position will be maintained based on the itemId, which means if you add/remove items before the current visible item the item with the given itemId will be kept as the first visible one. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyListScope.items

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyList.kt+function:items)

```
inline fun <T : Any?> LazyListScope.items(
    items: List<T>,
    crossinline itemId: (item) -> Long = { LazyListScope.UnspecifiedItemId },
    crossinline itemContent: @Composable LazyItemScope.(item) -> Unit
): Unit
```

Adds a list of items.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | the data list |
| `crossinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { LazyListScope.UnspecifiedItemId }` | a factory of stable and unique ids representing the item. The value may not be less than or equal to -2\^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyVerticalGridScope.items

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyVerticalGrid.kt+function:items)

```
inline fun <T : Any?> LazyVerticalGridScope.items(
    items: List<T>,
    crossinline itemId: (item) -> Long = { LazyVerticalGridScope.UnspecifiedItemId },
    crossinline itemContent: @Composable LazyItemScope.(item) -> Unit
): Unit
```

Adds a list of items.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | the data list |
| `crossinline itemId: (item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { LazyVerticalGridScope.UnspecifiedItemId }` | a factory of stable and unique ids representing the item. The value may not be less than or equal to -2\^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyListScope.itemsIndexed

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyList.kt+function:itemsIndexed) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

```
inline fun <T : Any?> LazyListScope.itemsIndexed(
    items: Array<T>,
    noinline itemId: (index: Int, item) -> Long = { _, _ -> LazyListScope.UnspecifiedItemId },
    crossinline itemContent: @Composable LazyItemScope.(index: Int, item) -> Unit
): Unit
```

Adds a array of items where the content of an item is aware of its index.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` | the data array |
| `noinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { _, _ -> LazyListScope.UnspecifiedItemId }` | a factory of stable and unique list item ids. Using the same itemId for multiple items in the array is not allowed. When you specify the itemId the scroll position will be maintained based on the itemId, which means if you add/remove items before the current visible item the item with the given itemId will be kept as the first visible one. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyVerticalGridScope.itemsIndexed

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyVerticalGrid.kt+function:itemsIndexed) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

```
inline fun <T : Any?> LazyVerticalGridScope.itemsIndexed(
    items: Array<T>,
    noinline itemId: (index: Int, item) -> Long = { _, _ ->
        LazyVerticalGridScope.UnspecifiedItemId
    },
    crossinline itemContent: @Composable LazyItemScope.(index: Int, item) -> Unit
): Unit
```

Adds a array of items where the content of an item is aware of its index.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` | the data array |
| `noinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { _, _ -> LazyVerticalGridScope.UnspecifiedItemId }` | a factory of stable and unique list item ids. Using the same itemId for multiple items in the array is not allowed. When you specify the itemId the scroll position will be maintained based on the itemId, which means if you add/remove items before the current visible item the item with the given itemId will be kept as the first visible one. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyListScope.itemsIndexed

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyList.kt+function:itemsIndexed)

```
inline fun <T : Any?> LazyListScope.itemsIndexed(
    items: List<T>,
    crossinline itemId: (index: Int, item) -> Long = { _, _ ->
        LazyListScope.UnspecifiedItemId
    },
    crossinline itemContent: @Composable LazyItemScope.(index: Int, item) -> Unit
): Unit
```

Adds a list of items where the content of an item is aware of its index.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | the data list |
| `crossinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { _, _ -> LazyListScope.UnspecifiedItemId }` | a factory of stable and unique ids representing the item. The value may not be less than or equal to -2\^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |

### LazyVerticalGridScope.itemsIndexed

Artifact: [androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyVerticalGrid.kt+function:itemsIndexed)

```
inline fun <T : Any?> LazyVerticalGridScope.itemsIndexed(
    items: List<T>,
    crossinline itemId: (index: Int, item) -> Long = { _, _ ->
        LazyVerticalGridScope.UnspecifiedItemId
    },
    crossinline itemContent: @Composable LazyItemScope.(index: Int, item) -> Unit
): Unit
```

Adds a list of items where the content of an item is aware of its index.

| Parameters |
|---|---|
| `items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | the data list |
| `crossinline itemId: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = { _, _ -> LazyVerticalGridScope.UnspecifiedItemId }` | a factory of stable and unique ids representing the item. The value may not be less than or equal to -2\^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices. |
| `crossinline itemContent: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/LazyItemScope.(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the content displayed by a single item |