PaginatedContent

fun PaginatedContent(pages: List<PaginationPage>, modifier: Modifier = Modifier, initialPage: Int = 0, titleAlignment: PageTitleAlignment = PageTitleAlignment.LEADING, direction: PageDirection = PageDirection.BIDIRECTIONAL, footerStyle: PageFooterStyle = PageFooterStyle.DOTS, showScrollHint: Boolean = true, onPageChanged: (Int) -> Unit? = null, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, pageTitle: @Composable (pageIndex: Int, page: PaginationPage, progress: Float) -> Unit = { _, page, progress -> DefaultPageTitle(page.title, progress) }, pageContent: @Composable PagerScope.(pageIndex: Int, page: PaginationPage) -> Unit)

Horizontally paged content whose title row scrolls in step with the pages: each title is a page width from its neighbors, so the next title slides in as the user swipes. This overload owns its PagerState.

Parameters

showScrollHint

briefly nudges the first page on first display to show it can be swiped. Skipped when the system reduces motion.

pagePositionDescription

builds the footer's spoken position, such as { index, count -> "Page ${index + 1} of $count" }; null keeps the footer silent.


fun PaginatedContent(pages: List<PaginationPage>, pagerState: PagerState, modifier: Modifier = Modifier, titleAlignment: PageTitleAlignment = PageTitleAlignment.LEADING, direction: PageDirection = PageDirection.BIDIRECTIONAL, footerStyle: PageFooterStyle = PageFooterStyle.DOTS, showScrollHint: Boolean = true, onPageChanged: (Int) -> Unit? = null, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, pageTitle: @Composable (pageIndex: Int, page: PaginationPage, progress: Float) -> Unit = { _, page, progress -> DefaultPageTitle(page.title, progress) }, pageContent: @Composable PagerScope.(pageIndex: Int, page: PaginationPage) -> Unit)

PaginatedContent driven by a caller-owned pagerState, for jumping to pages from outside. onPageChanged reports the settled page.