Buttons
Buttonsanimated

Progress Ring

An icon button encircled by a determinate arc tracking task progress.

Installation

caveui components are copy-paste Jetpack Compose built entirely on Material 3 — there's no caveui dependency to add. Make sure Material 3 is on your classpath (it ships with the Compose BOM), then copy the Usage snippet below into your project.

kotlin
// build.gradle.kts (module)
dependencies {
    implementation(platform("androidx.compose:compose-bom:2025.06.00"))
    implementation("androidx.compose.material3:material3")
}

Usage

kotlin
val progress by animateFloatAsState(0.7f, label = "ring")
Box(contentAlignment = Alignment.Center) {
    CircularProgressIndicator(
        progress = { progress },
        modifier = Modifier.size(52.dp),
        strokeWidth = 3.dp,
        trackColor = MaterialTheme.colorScheme.surfaceVariant,
    )
    FilledIconButton(onClick = {}, modifier = Modifier.size(40.dp)) {
        Icon(Icons.Filled.Check, contentDescription = "Done")
    }
}