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 PricingTierCard() {
ElevatedCard(
modifier = Modifier.width(240.dp),
shape = RoundedCornerShape(20.dp),
colors = CardDefaults.elevatedCardColors(
containerColor = MaterialTheme.colorScheme.primaryContainer
)
) {
Column(
Modifier.padding(20.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(Icons.Default.Star, null, modifier = Modifier.size(16.dp))
Text(" PRO", style = MaterialTheme.typography.labelLarge)
}
Text("$24", style = MaterialTheme.typography.displaySmall)
Text("per month",
style = MaterialTheme.typography.bodySmall)
Spacer(Modifier.height(12.dp))
listOf("Unlimited", "Priority", "Analytics").forEach {
Row(Modifier.padding(vertical = 2.dp)) {
Icon(Icons.Default.Check, null,
modifier = Modifier.size(16.dp))
Text(" $it")
}
}
Spacer(Modifier.height(12.dp))
Button(onClick = {}, Modifier.fillMaxWidth()) {
Text("Choose plan")
}
}
}
}