🌈 Create new beautiful Compose Gradients with our new wesite ->

CircularProgressIndicator

CircularProgressIndicator preview
Kotlin
@Composable
public fun CircularProgressIndicatorWithAnimation() {
    var progress by remember { mutableStateOf(0.1f) }
    val animatedProgress by
        animateFloatAsState(
            targetValue = progress,
            animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
        )

    Column(horizontalAlignment = Alignment.CenterHorizontally) {
        CircularProgressIndicator(progress = animatedProgress)
        Spacer(Modifier.requiredHeight(10.dp))
        CompactChip(
            modifier = Modifier.width(90.dp),
            onClick = { if (progress < 1f) progress += 0.1f },
            label = { Text("Increase") },
        )
    }
}