Cards
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 TripCountdownCard() {
var secs by remember { mutableStateOf(0) }
LaunchedEffect(Unit) {
while (true) { delay(1000); secs++ }
}
ElevatedCard(
modifier = Modifier.fillMaxWidth().padding(16.dp)
) {
Column(Modifier.padding(20.dp)) {
Text(
"Trip to Lisbon",
style = MaterialTheme.typography.titleMedium
)
Spacer(Modifier.height(10.dp))
Row(
Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceEvenly
) {
listOf("12" to "days", "06" to "hrs",
"${secs % 60}" to "sec").forEach { (v, l) ->
Column(
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(v, style = MaterialTheme.typography.headlineSmall)
Text(l, style = MaterialTheme.typography.labelSmall)
}
}
}
}
}
}