# GlimmerLazyColumn

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyColumn.composable#GlimmerLazyColumn(androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)( modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, state: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListState, contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues, userScrollEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, overscrollEffect: https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect?, flingBehavior: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/FlingBehavior, reverseLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal, verticalArrangement: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Vertical, content: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` This is a scrolling list component that only composes and lays out the currently visible items. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyColumn.composable#GlimmerLazyColumn(kotlin.Function0,androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)( title: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, state: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListState, contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues, userScrollEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, overscrollEffect: https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect?, flingBehavior: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/FlingBehavior, reverseLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal, verticalArrangement: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Vertical, content: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` This is a scrolling list component that only composes and lays out the currently visible items. |

## Functions

### GlimmerLazyColumn

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/list/GlimmerLazyList.kt+function:GlimmerLazyColumn)

```
@Composable
fun GlimmerLazyColumn(
    modifier: Modifier = Modifier,
    state: GlimmerLazyListState = rememberGlimmerLazyListState(),
    contentPadding: PaddingValues = GlimmerLazyColumnDefaults.contentPadding,
    userScrollEnabled: Boolean = true,
    overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(),
    flingBehavior: FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state),
    reverseLayout: Boolean = false,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    verticalArrangement: Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement,
    content: GlimmerLazyListScope.() -> Unit
): Unit
```

This is a scrolling list component that only composes and lays out the currently visible items. It is similar to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.lazy.layout.LazyLayoutCacheWindow,kotlin.Function1)`, but with extra functionality and customized behavior required for Jetpack Compose Glimmer. For Jetpack Compose Glimmer applications, it is recommended to use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyColumn.composable#GlimmerLazyColumn(androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` instead of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.lazy.layout.LazyLayoutCacheWindow,kotlin.Function1)`, as it is specifically designed to provide seamless focus-based navigation, visual scrim edge effects and support for focus-aware snap behavior.

The `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/package-summary#GlimmerLazyColumn(androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` block defines a DSL which allows you to emit items of different types. For example, you can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#item(kotlin.Any,kotlin.Any,kotlin.Function1)` to add a single item and `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#items(kotlin.Int,kotlin.Function1,kotlin.Function1,kotlin.Function2)` to add a list of items.

See the other `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyColumn.composable#GlimmerLazyColumn(androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` overload for a variant with a title slot.

```kotlin
import androidx.xr.glimmer.ListItem
import androidx.xr.glimmer.Text
import androidx.xr.glimmer.list.GlimmerLazyColumn
import androidx.xr.glimmer.list.items

GlimmerLazyColumn {
    item { ListItem { Text("Header") } }
    items(count = 10) { index -> ListItem { Text("Item-$index") } }
    item { ListItem { Text("Footer") } }
}
```

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the modifier to apply to this layout. |
| `state: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListState = rememberGlimmerLazyListState()` | the state object to be used to control or observe the list's state. |
| `contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues = GlimmerLazyColumnDefaults.contentPadding` | a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/package-summary#GlimmerLazyColumn(androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` param. You can use it to add a padding before the first item or after the last one. |
| `userScrollEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | If user gestures are enabled. |
| `overscrollEffect: https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect? = rememberOverscrollEffect()` | the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` that will be used to render overscroll for this layout. Note that the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect#node()` will be applied internally as well - you do not need to use Modifier.overscroll separately. |
| `flingBehavior: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state)` | logic describing fling and snapping behavior when drag has finished. |
| `reverseLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | reverses the direction of scrolling and layout. |
| `horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal = Alignment.Start` | aligns items horizontally. |
| `verticalArrangement: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement` | is arrangement for items. This only applies if the content is smaller than the viewport. |
| `content: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | a block which describes the content. Inside this block you can use methods like `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#item(kotlin.Any,kotlin.Any,kotlin.Function1)` to add a single item or `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#items(kotlin.Int,kotlin.Function1,kotlin.Function1,kotlin.Function2)` to add a list of items. |

### GlimmerLazyColumn

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/list/GlimmerLazyList.kt+function:GlimmerLazyColumn)

```
@Composable
fun GlimmerLazyColumn(
    title: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    state: GlimmerLazyListState = rememberGlimmerLazyListState(),
    contentPadding: PaddingValues = GlimmerLazyColumnDefaults.contentPaddingWithTitle,
    userScrollEnabled: Boolean = true,
    overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(),
    flingBehavior: FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state),
    reverseLayout: Boolean = false,
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    verticalArrangement: Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement,
    content: GlimmerLazyListScope.() -> Unit
): Unit
```

This is a scrolling list component that only composes and lays out the currently visible items. It is similar to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.lazy.layout.LazyLayoutCacheWindow,kotlin.Function1)`, but with extra functionality and customized behavior required for Jetpack Compose Glimmer. Jetpack Compose Glimmer applications should always use GlimmerLazyColumn instead of LazyColumn to ensure correct behavior.

The `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/package-summary#GlimmerLazyColumn(kotlin.Function0,androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` block defines a DSL which allows you to emit items of different types. For example, you can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#item(kotlin.Any,kotlin.Any,kotlin.Function1)` to add a single item and `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#items(kotlin.Int,kotlin.Function1,kotlin.Function1,kotlin.Function2)` to add a list of items.

This overload of `GlimmerLazyColumn` contains a `title` slot. The title is expected to be a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/TitleChip.composable#TitleChip(androidx.compose.ui.Modifier,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)`. It is positioned at the top center and visually overlaps the list content. The list is vertically offset to start from the title's vertical center. When the list is scrolled, the title remains static.

See the other `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyColumn.composable#GlimmerLazyColumn(kotlin.Function0,androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` overload for a variant with no title slot.

```kotlin
import androidx.xr.glimmer.ListItem
import androidx.xr.glimmer.Text
import androidx.xr.glimmer.TitleChip
import androidx.xr.glimmer.list.GlimmerLazyColumn
import androidx.xr.glimmer.list.items

val ingredientItems =
    listOf("Milk", "Flour", "Egg", "Salt", "Apples", "Butter", "Vanilla", "Sugar", "Cinnamon")
GlimmerLazyColumn(title = { TitleChip { Text("Ingredients") } }) {
    items(ingredientItems) { text -> ListItem { Text(text) } }
}
```

| Parameters |
|---|---|
| `title: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | a composable slot for the list title, expected to be a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/TitleChip.composable#TitleChip(androidx.compose.ui.Modifier,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)`. It overlaps the list, positioned at the top-center, and remains stuck to the top when the list is scrolled. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | applies to the layout that contains both list and title. |
| `state: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListState = rememberGlimmerLazyListState()` | the state object to be used to control or observe the list's state. |
| `contentPadding: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues = GlimmerLazyColumnDefaults.contentPaddingWithTitle` | a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/package-summary#GlimmerLazyColumn(kotlin.Function0,androidx.compose.ui.Modifier,androidx.xr.glimmer.list.GlimmerLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.layout.Arrangement.Vertical,kotlin.Function1)` param. You can use it to add a padding before the first item or after the last one. The list is vertically offset to start from the title's vertical center, so custom content paddings must provide sufficient space to avoid content being obscured. |
| `userScrollEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | If user gestures are enabled. |
| `overscrollEffect: https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect? = rememberOverscrollEffect()` | the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` that will be used to render overscroll for this layout. Note that the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect#node()` will be applied internally as well - you do not need to use Modifier.overscroll separately. |
| `flingBehavior: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/FlingBehavior = GlimmerLazyColumnDefaults.flingBehavior(state)` | logic describing fling and snapping behavior when drag has finished. |
| `reverseLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | reverses the direction of scrolling and layout. |
| `horizontalAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal = Alignment.Start` | aligns items horizontally. |
| `verticalArrangement: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Vertical = GlimmerLazyColumnDefaults.verticalArrangement` | is arrangement for items. This only applies if the content is smaller than the viewport. |
| `content: https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | a block which describes the content. Inside this block you can use methods like `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#item(kotlin.Any,kotlin.Any,kotlin.Function1)` to add a single item or `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/list/GlimmerLazyListScope#items(kotlin.Int,kotlin.Function1,kotlin.Function1,kotlin.Function2)` to add a list of items. |