Cards
Cardsanimated

Ride Arriving

Ride-share card with pulsing car icon and animated arrival ETA bar.

Toyota Prius · 7XJ 204

Arriving in 2 min

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 RideArrivingCard() {
  val pulse = rememberInfiniteTransition(label = "p")
  val a by pulse.animateFloat(
    0.4f, 1f, infiniteRepeatable(
      tween(900), RepeatMode.Reverse
    ), label = "a"
  )
  ElevatedCard(
    modifier = Modifier.fillMaxWidth().padding(16.dp)
  ) {
    Row(
      Modifier.padding(18.dp),
      verticalAlignment = Alignment.CenterVertically
    ) {
      Canvas(Modifier.size(40.dp)) {
        drawCircle(
          Color(0xFF10B981).copy(alpha = a),
          size.minDimension / 2
        )
      }
      Spacer(Modifier.width(14.dp))
      Column {
        Text(
          "Toyota Prius · 7XJ 204",
          style = MaterialTheme.typography.bodyMedium
        )
        Text(
          "Arriving in 2 min",
          style = MaterialTheme.typography.bodySmall
        )
      }
    }
  }
}