PdfScrollableThumbnailBar

fun PdfScrollableThumbnailBar(stateManager: ThumbnailBarStateManager, onPageChanged: (pageIndex: Int) -> Unit, modifier: Modifier = Modifier, lazyListState: LazyListState = rememberLazyListState(), windowInsets: WindowInsets = WindowInsets.navigationBars)

Composable function for the PDF Scrollable Thumbnail Bar.

Displays a horizontally scrollable LazyRow of larger page thumbnails. Users scroll to browse and click a thumbnail to navigate. Only visible thumbnails are rendered (on-demand).

Scroll position is hoisted via lazyListState so callers can observe scroll state directly off the LazyListState (e.g. firstVisibleItemIndex, isScrollInProgress, interactionSource) instead of through dedicated callbacks. The View-based com.pspdfkit.ui.PdfThumbnailBar uses this hook to bridge a LazyListState to its legacy OnScrollListener API.

Parameters

stateManager

The state manager that holds business logic

onPageChanged

Callback when user navigates to a different page

modifier

Modifier for customizing the layout. Apply Modifier.padding here for transparent margin around the bar.

lazyListState

The hoisted scroll state for the underlying LazyRow. Callers may observe it to react to scroll position or scroll-state transitions.

windowInsets

System window insets the bar accounts for in its own sizing — the bottom value is added to the bar height and used as the LazyRow content's bottom padding so thumbnails clear the inset while the bar background extends behind it. Pass WindowInsets (0,0,0,0) to opt out entirely.