Badges
Now playing
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 = "eq")
Surface(
shape = RoundedCornerShape(50),
color = Color(0xFF8B5CF6).copy(alpha = 0.14f),
contentColor = Color(0xFF7C3AED),
) {
Row(
Modifier.padding(start = 8.dp, end = 10.dp, top = 4.dp, bottom = 4.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp),
) {
Row(
verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.spacedBy(2.dp),
) {
repeat(4) { i ->
val h by t.animateFloat(
initialValue = 0.3f,
targetValue = 1f,
animationSpec = infiniteRepeatable(
tween(420 + i * 90),
RepeatMode.Reverse,
),
label = "bar",
)
Box(
Modifier
.width(2.5.dp)
.height(12.dp)
.graphicsLayer { scaleY = h; transformOrigin = TransformOrigin(0.5f, 1f) }
.background(Color(0xFF7C3AED), RoundedCornerShape(2.dp)),
)
}
}
Text("Now playing", fontSize = 12.sp, fontWeight = FontWeight.Medium)
}
}