Cards
Cardsanimated
Itinerary Timeline
Vertical itinerary timeline with animated dots filling along the journey.
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 ItineraryTimelineCard() {
val steps = listOf("Airport", "Hotel", "Tour", "Dinner")
val prog = remember { Animatable(0f) }
LaunchedEffect(Unit) {
prog.animateTo(steps.size.toFloat(), tween(1600))
}
Card(modifier = Modifier.fillMaxWidth().padding(16.dp)) {
Column(Modifier.padding(20.dp)) {
steps.forEachIndexed { i, s ->
Row(verticalAlignment = Alignment.CenterVertically) {
val on = prog.value > i
Canvas(Modifier.size(14.dp)) {
drawCircle(
if (on) Color(0xFF6366F1)
else Color.Gray.copy(0.3f),
size.minDimension / 2
)
}
Spacer(Modifier.width(12.dp))
Text(s, style = MaterialTheme.typography.bodyMedium)
}
if (i < steps.size - 1) Spacer(Modifier.height(10.dp))
}
}
}
}