Cards
Cardsanimated

Nearby Place

Nearby place card with animated distance ripple and category badge.

Blue Bottle Coffee

250 m away · Café

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 NearbyPlaceCard() {
  val ripple = rememberInfiniteTransition(label = "r")
  val r by ripple.animateFloat(
    0f, 1f, infiniteRepeatable(tween(1500)), label = "r"
  )
  ElevatedCard(
    modifier = Modifier.fillMaxWidth().padding(16.dp)
  ) {
    Row(
      Modifier.padding(18.dp),
      verticalAlignment = Alignment.CenterVertically
    ) {
      Canvas(Modifier.size(40.dp)) {
        drawCircle(
          Color(0xFF0EA5E9).copy(alpha = 1f - r),
          size.minDimension / 2 * r
        )
        drawCircle(Color(0xFF0EA5E9), 6f)
      }
      Spacer(Modifier.width(14.dp))
      Column {
        Text("Blue Bottle Coffee",
          style = MaterialTheme.typography.bodyMedium)
        Text("250 m away · Café",
          style = MaterialTheme.typography.bodySmall)
      }
    }
  }
}