Cards
Cardsanimated
Cover Progress Ring
Album art encircled by an animated progress ring with a centered play button.
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 CoverProgressRing(progress: Float) {
val anim by animateFloatAsState(
targetValue = progress,
animationSpec = tween(800),
label = "ring",
)
Card(
shape = RoundedCornerShape(24.dp),
modifier = Modifier.fillMaxWidth(),
) {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.padding(20.dp),
) {
Box(contentAlignment = Alignment.Center) {
Canvas(Modifier.size(120.dp)) {
drawArc(
color = Color(0xFF2A2A35),
startAngle = -90f,
sweepAngle = 360f,
useCenter = false,
style = Stroke(8f, cap = StrokeCap.Round),
)
drawArc(
brush = Brush.sweepGradient(
listOf(Color(0xFFFF8A00), Color(0xFFFF2D95)),
),
startAngle = -90f,
sweepAngle = 360f * anim,
useCenter = false,
style = Stroke(8f, cap = StrokeCap.Round),
)
}
Box(
modifier = Modifier
.size(92.dp)
.clip(CircleShape)
.background(
Brush.linearGradient(
listOf(Color(0xFF6D28D9), Color(0xFFDB2777)),
),
),
contentAlignment = Alignment.Center,
) {
Icon(
Icons.Default.PlayArrow,
contentDescription = null,
tint = Color.White,
)
}
}
Spacer(Modifier.height(14.dp))
Text("Solar Flux", style = MaterialTheme.typography.titleMedium)
}
}
}