Icons
Iconsanimated
Progress ring
A determinate ring that sweeps from empty to full, ideal for upload or 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
@Composable
fun ProgressRing(progress: Float) { // 0f..1f
val p by animateFloatAsState(progress, tween(600, easing = EaseInOutCubic), label = "p")
val track = MaterialTheme.colorScheme.surfaceVariant
val color = MaterialTheme.colorScheme.primary
Canvas(Modifier.size(40.dp)) {
val s = Stroke(4.dp.toPx(), cap = StrokeCap.Round)
drawCircle(track, style = s)
drawArc(color, -90f, 360f * p, false, style = s)
}
}