Loaders
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 = "waveline")
val phase by t.animateFloat(
initialValue = 0f,
targetValue = (2 * Math.PI).toFloat(),
animationSpec = infiniteRepeatable(tween(1100, easing = LinearEasing)),
label = "phase",
)
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(4.dp),
) {
repeat(7) { i ->
val y = sin(phase + i * 0.7f) * 8f
Box(
Modifier
.offset(y = y.dp)
.size(6.dp)
.background(MaterialTheme.colorScheme.primary, CircleShape),
)
}
}