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 LoyaltyTierCard() {
val progress by animateFloatAsState(0.72f, tween(900), label = "p")
Card(
modifier = Modifier.width(260.dp),
shape = RoundedCornerShape(18.dp),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.tertiaryContainer
)
) {
Column(Modifier.padding(18.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(Icons.Default.WorkspacePremium, null,
modifier = Modifier.size(28.dp))
Spacer(Modifier.width(10.dp))
Column {
Text("Gold Member",
style = MaterialTheme.typography.titleMedium)
Text("1,440 pts",
style = MaterialTheme.typography.bodySmall)
}
}
Spacer(Modifier.height(14.dp))
LinearProgressIndicator(
progress = { progress },
modifier = Modifier.fillMaxWidth().height(8.dp),
strokeCap = StrokeCap.Round
)
Spacer(Modifier.height(6.dp))
Text("560 pts to Platinum",
style = MaterialTheme.typography.labelSmall)
}
}
}