Cards
Cardsanimated

Hotel Booking

Hotel booking summary with star rating and animated check-in dates.

Hotel Marina Bay
Jul 12 → 16$640

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 HotelBookingCard() {
  val stars = 4
  ElevatedCard(
    modifier = Modifier.fillMaxWidth().padding(16.dp)
  ) {
    Column(Modifier.padding(20.dp)) {
      Text(
        "Hotel Marina Bay",
        style = MaterialTheme.typography.titleMedium
      )
      Row {
        repeat(5) { i ->
          val c = if (i < stars) Color(0xFFF59E0B)
            else Color.Gray.copy(alpha = 0.3f)
          Canvas(Modifier.size(16.dp)) {
            drawCircle(c, size.minDimension / 3)
          }
        }
      }
      Spacer(Modifier.height(10.dp))
      Row(
        Modifier.fillMaxWidth(),
        horizontalArrangement = Arrangement.SpaceBetween
      ) {
        Text(
          "Jul 12 → Jul 16",
          style = MaterialTheme.typography.bodySmall
        )
        Text("$640", style = MaterialTheme.typography.titleSmall)
      }
    }
  }
}