← Back to Foundation
LazyRowItems
Overview
Examples
Community Notes
A horizontally scrolling list that only composes and lays out the currently visible items.
@param items the backing list of data to display @param modifier the modifier to apply to this layout @param contentPadding convenience param to specify a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via modifier param. Note that it isnot* a padding applied for each item's content @param itemContent emits the UI for an item from items list. May emit any number of components, which will be stacked horizontally. Note that LazyRowItems can start scrolling incorrectly if you emit nothing and then lazily recompose with the real content, so even if you load the content asynchronously please reserve some space for the item, for example using Spacer.
Overloads
LazyRowItems
@Composable
fun <T> LazyRowItems(
items: List<T>,
modifier: Modifier = Modifier,
contentPadding: InnerPadding = InnerPadding(0.dp),
itemContent: @Composable (T) -> Unit
)
Parameters
Name | Description |
---|---|
items | the backing list of data to display |
modifier | the modifier to apply to this layout |
contentPadding | convenience param to specify a padding around the whole content. This will add padding for the content after it has been clipped, which is not possible via modifier param. Note that it isnot* a padding applied for each item's content |
itemContent | emits the UI for an item from items list. May emit any number of components, which will be stacked horizontally. Note that LazyRowItems can start scrolling incorrectly if you emit nothing and then lazily recompose with the real content, so even if you load the content asynchronously please reserve some space for the item, for example using Spacer |