Package-level declarations

Types

Link copied to clipboard

Compose representation of Pageable.

Link copied to clipboard

Compose representation of Pageable specific to standard pager UI components.

Link copied to clipboard
sealed interface PageItemKeyProvider<T>

Functions

Link copied to clipboard
fun <PageItem> HorizontalPager(state: PageablePagerComposeState<PageItem>, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), pageSize: PageSize = PageSize.Fill, beyondViewportPageCount: Int = PagerDefaults.BeyondViewportPageCount, pageSpacing: Dp = 0.dp, verticalAlignment: Alignment.Vertical = Alignment.CenterVertically, flingBehavior: TargetedFlingBehavior = PagerDefaults.flingBehavior(state = state.pagerState), userScrollEnabled: Boolean = true, reverseLayout: Boolean = false, pageNestedScrollConnection: NestedScrollConnection = PagerDefaults.pageNestedScrollConnection(state.pagerState, Orientation.Vertical), snapPosition: SnapPosition = SnapPosition.Start, overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(), pageContent: @Composable PagerScope.(PageItem) -> Unit)

A horizontal pager that displays items from a PageablePagerComposeState.

Link copied to clipboard
inline fun <T> LazyListScope.items(state: PageableComposeState<T>, noinline contentType: (T) -> Any? = { null }, crossinline itemContent: @Composable LazyItemScope.(T) -> Unit)
inline fun <T> LazyGridScope.items(state: PageableComposeState<T>, noinline contentType: (T) -> Any? = { null }, crossinline itemContent: @Composable LazyGridItemScope.(T) -> Unit)
inline fun <T> LazyStaggeredGridScope.items(state: PageableComposeState<T>, crossinline contentType: (T) -> Any? = { null }, noinline span: (T) -> StaggeredGridItemSpan? = null, crossinline itemContent: @Composable LazyStaggeredGridItemScope.(T) -> Unit)
Link copied to clipboard
inline fun <T> LazyListScope.itemsIndexed(state: PageableComposeState<T>, crossinline contentType: (Int, T) -> Any? = { _, _ -> null }, crossinline itemContent: @Composable LazyItemScope.(index: Int, item: T) -> Unit)
inline fun <T> LazyGridScope.itemsIndexed(state: PageableComposeState<T>, crossinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, crossinline itemContent: @Composable LazyGridItemScope.(index: Int, item: T) -> Unit)
inline fun <T> LazyStaggeredGridScope.itemsIndexed(state: PageableComposeState<T>, crossinline contentType: (index: Int, item: T) -> Any? = { _, _ -> null }, noinline span: (index: Int, item: T) -> StaggeredGridItemSpan? = null, crossinline itemContent: @Composable LazyStaggeredGridItemScope.(index: Int, item: T) -> Unit)
Link copied to clipboard
@JvmName(name = "toPagerStateVisible")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toPagerState(initialPage: Int = 0, @FloatRange(from = -0.5, to = 0.5) initialPageOffsetFraction: Float = 0.0f, coroutineContext: CoroutineContext = EmptyCoroutineContext, key: (PageItem) -> Any = ::pageItemKey): PageablePagerComposeState<PageItem>

Binds a Pageable to a Compose Pager (e.g., HorizontalPager or VerticalPager).

Link copied to clipboard
@JvmName(name = "toStateList")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyListState, coroutineContext: CoroutineContext = EmptyCoroutineContext, key: (PageItem) -> Any = ::pageItemKey): PageableComposeState<PageItem>

Binds a Pageable to a LazyListState, enabling automatic page fetching as items become visible.

@JvmName(name = "toStateGrid")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyGridState, coroutineContext: CoroutineContext = EmptyCoroutineContext, key: (PageItem) -> Any = ::pageItemKey): PageableComposeState<PageItem>

Binds a Pageable to a LazyGridState, enabling automatic page fetching as items become visible.

@JvmName(name = "toStateStaggeredGrid")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyStaggeredGridState, coroutineContext: CoroutineContext = EmptyCoroutineContext, key: (PageItem) -> Any = ::pageItemKey): PageableComposeState<PageItem>

Binds a Pageable to a LazyStaggeredGridState, enabling automatic page fetching as items become visible.

Link copied to clipboard
fun <PageItem> VerticalPager(state: PageablePagerComposeState<PageItem>, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), pageSize: PageSize = PageSize.Fill, beyondViewportPageCount: Int = PagerDefaults.BeyondViewportPageCount, pageSpacing: Dp = 0.dp, horizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally, flingBehavior: TargetedFlingBehavior = PagerDefaults.flingBehavior(state = state.pagerState), userScrollEnabled: Boolean = true, reverseLayout: Boolean = false, pageNestedScrollConnection: NestedScrollConnection = PagerDefaults.pageNestedScrollConnection(state.pagerState, Orientation.Vertical), snapPosition: SnapPosition = SnapPosition.Start, overscrollEffect: OverscrollEffect? = rememberOverscrollEffect(), pageContent: @Composable PagerScope.(PageItem) -> Unit)

A vertical pager that displays items from a PageablePagerComposeState.