Cards
Cardsanimated
Weather At Destination
Destination weather card with animated sun rays and temperature reading.
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 WeatherDestCard() {
val rot = rememberInfiniteTransition(label = "r")
val a by rot.animateFloat(
0f, 360f, infiniteRepeatable(tween(8000)), label = "a"
)
ElevatedCard(
modifier = Modifier.fillMaxWidth().padding(16.dp)
) {
Row(
Modifier.padding(20.dp),
verticalAlignment = Alignment.CenterVertically
) {
Canvas(Modifier.size(48.dp)) {
rotate(a) {
repeat(8) {
drawLine(
Color(0xFFF59E0B),
Offset(size.width / 2, 0f),
Offset(size.width / 2, 10f), 3f
)
rotate(45f) {}
}
}
drawCircle(Color(0xFFF59E0B), size.minDimension / 4)
}
Spacer(Modifier.width(16.dp))
Column {
Text("Barcelona", style = MaterialTheme.typography.titleMedium)
Text("28°C · Sunny",
style = MaterialTheme.typography.bodySmall)
}
}
}
}