Cards
Cardsanimated

Destination Cover

Destination hero card with gradient overlay and animated zoom on hover.

Santorini, Greece

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 DestinationCoverCard() {
  var hovered by remember { mutableStateOf(false) }
  val scale by animateFloatAsState(
    if (hovered) 1.08f else 1f, label = "zoom"
  )
  Card(
    modifier = Modifier.fillMaxWidth().padding(16.dp)
      .clickable { hovered = !hovered }
  ) {
    Box(Modifier.height(160.dp)) {
      Box(
        Modifier.matchParentSize()
          .graphicsLayer { scaleX = scale; scaleY = scale }
          .background(
            Brush.verticalGradient(
              listOf(Color(0xFF0EA5E9), Color(0xFF1E3A8A))
            )
          )
      )
      Text(
        "Santorini, Greece",
        color = Color.White,
        style = MaterialTheme.typography.titleLarge,
        modifier = Modifier.align(Alignment.BottomStart)
          .padding(16.dp)
      )
    }
  }
}