PageIndicator

fun PageIndicator(currentPage: Int, pageCount: Int, modifier: Modifier = Modifier, activeColor: Color = MaterialTheme.colorScheme.primary, inactiveColor: Color = MaterialTheme.colorScheme.outlineVariant)

Pill-style page indicator for a carousel, banner or onboarding pager: the active page's dot stretches into a pill, the rest stay round.

Sizing is adaptive rather than fixed. The source this came from carried indicatorWidth / indicatorHeight twice — once in BannerDefaults and again in TvDimens (28x6 on a phone rising to 42x10 on a 4K panel) — because a 6dp dot is invisible from a sofa. Same rule here, derived from the surface instead of duplicated per component.

val pager = rememberPagerState { banners.size }
PageIndicator(pager.currentPage, banners.size)

ponytail: takes currentPage: Int rather than a PagerState. PagerState lives in compose.foundation.pager, and binding to it would stop this working for anything that isn't a pager — an image carousel driven by a LazyRow, a step counter, a stack of onboarding cards. An Int is the whole contract.