StylishDotIndicator

fun StylishDotIndicator(pageCount: Int, currentPage: Int, modifier: Modifier = Modifier, activeSize: Dp = 8.dp, inactiveSize: Dp = 6.dp, spacing: Dp = 4.dp, activeColor: Color = MaterialTheme.colorScheme.onSurface, inactiveColor: Color = MaterialTheme.colorScheme.outlineVariant)

A horizontal row of dots indicating the current page in a paged container (e.g. a pager). The active dot uses activeSize and activeColor; inactive dots use inactiveSize and inactiveColor. Size changes are animated so the active dot smoothly grows or shrinks as the page changes.

Parameters

pageCount

The total number of pages (dots to render). Must be at least 1.

currentPage

The zero-based index of the currently active page. Clamped to 0..pageCount - 1.

modifier

Modifier applied to the outer Row.

activeSize

Diameter of the active dot. Defaults to 8.dp.

inactiveSize

Diameter of inactive dots. Defaults to 6.dp.

spacing

Gap between adjacent dots. Defaults to 4.dp.

activeColor

Color of the active dot. Defaults to MaterialTheme.colorScheme.onSurface.

inactiveColor

Color of inactive dots. Defaults to MaterialTheme.colorScheme.outlineVariant.