Skip to content

indicator row

milan jurkulák edited this page May 2, 2024 · 1 revision

//tvlib/org.mjdev.tvlib.ui.components.carousel/CarouselDefaults/IndicatorRow

IndicatorRow

[androidJvm]\

@Composable

fun IndicatorRow(itemCount: Int, activeItemIndex: Int, modifier: Modifier = Modifier, spacing: Dp = 8.dp, indicator: @Composable(isActive: Boolean) -> Unit = { isActive -> val activeColor = Color.White val inactiveColor = activeColor.copy(alpha = 0.3f) Box( modifier = Modifier .size(8.dp) .background( color = if (isActive) activeColor else inactiveColor, shape = CircleShape, ), ) })

Clone this wiki locally