androidx.compose.foundation.lazy.staggeredgrid

LazyStaggeredGridScope

Sealed interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

Receiver scope for LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid

sealed interface LazyStaggeredGridScope

Used by

Parameters that take a LazyStaggeredGridScope.

Functions

item

fun item(
    key: Any? = null,
    contentType: Any? = null,
    span: StaggeredGridItemSpan? = null,
    content: @Composable LazyStaggeredGridItemScope.() -> Unit,
)

Add a single item to the staggered grid.

items

fun items(
    count: Int,
    key: ((index: Int) -> Any)? = null,
    contentType: (index: Int) -> Any? = { null },
    span: ((index: Int) -> StaggeredGridItemSpan)? = null,
    itemContent: @Composable LazyStaggeredGridItemScope.(index: Int) -> Unit,
)

Add a count of items to the staggered grid.

Library docs

Receiver scope for LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid