Cards
Cardsanimated
Reservation Confirmed
Confirmation card with animated check circle drawing on successful booking.
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 ReservationConfirmedCard() {
val draw = remember { Animatable(0f) }
LaunchedEffect(Unit) { draw.animateTo(1f, tween(900)) }
ElevatedCard(
modifier = Modifier.fillMaxWidth().padding(16.dp)
) {
Column(
Modifier.fillMaxWidth().padding(24.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Canvas(Modifier.size(56.dp)) {
drawArc(
Color(0xFF10B981), -90f, 360f * draw.value,
false, style = Stroke(5f)
)
if (draw.value > 0.9f) {
drawLine(
Color(0xFF10B981),
Offset(size.width * 0.3f, size.height * 0.5f),
Offset(size.width * 0.45f, size.height * 0.65f), 5f
)
drawLine(
Color(0xFF10B981),
Offset(size.width * 0.45f, size.height * 0.65f),
Offset(size.width * 0.7f, size.height * 0.35f), 5f
)
}
}
Spacer(Modifier.height(12.dp))
Text("Reservation Confirmed",
style = MaterialTheme.typography.titleMedium)
}
}
}