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 CashbackPromoCard() {
val shimmer = rememberInfiniteTransition(label = "s")
val a by shimmer.animateFloat(0.4f, 1f,
infiniteRepeatable(tween(900), RepeatMode.Reverse), label = "a")
ElevatedCard(
modifier = Modifier.width(260.dp),
shape = RoundedCornerShape(20.dp),
colors = CardDefaults.elevatedCardColors(
containerColor = MaterialTheme.colorScheme.secondaryContainer
)
) {
Row(
Modifier.padding(20.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(Icons.Default.Percent, null,
modifier = Modifier.size(40.dp).alpha(a))
Spacer(Modifier.width(16.dp))
Column {
Text("5% Cashback",
style = MaterialTheme.typography.titleLarge)
Text("on every order this week",
style = MaterialTheme.typography.bodySmall)
}
}
}
}