Loaders
Loadersanimated

Striped 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 t = rememberInfiniteTransition(label = "stripes")
val shift by t.animateFloat(
    initialValue = 0f,
    targetValue = 28f,
    animationSpec = infiniteRepeatable(tween(500, easing = LinearEasing)),
    label = "shift",
)
val primary = MaterialTheme.colorScheme.primary
Box(
    Modifier
        .width(176.dp)
        .height(12.dp)
        .clip(RoundedCornerShape(50))
        .background(MaterialTheme.colorScheme.surfaceVariant),
) {
    Canvas(Modifier.fillMaxHeight().fillMaxWidth(0.66f)) {
        drawRect(primary)
        var x = -28f + shift
        while (x < size.width) {
            drawLine(
                color = Color.White.copy(alpha = 0.3f),
                start = Offset(x, size.height),
                end = Offset(x + 14f, 0f),
                strokeWidth = 8f,
            )
            x += 28f
        }
    }
}