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 OrderSummaryCard() {
Card(
modifier = Modifier.width(260.dp),
shape = RoundedCornerShape(18.dp)
) {
Column(Modifier.padding(16.dp)) {
Text("Order Summary",
style = MaterialTheme.typography.titleMedium)
Spacer(Modifier.height(12.dp))
listOf(
"Subtotal" to "$84.00",
"Shipping" to "$5.00",
"Discount" to "-$10.00"
).forEach { (k, v) ->
Row(Modifier.fillMaxWidth().padding(vertical = 3.dp),
horizontalArrangement = Arrangement.SpaceBetween) {
Text(k, color = MaterialTheme.colorScheme.onSurfaceVariant)
Text(v)
}
}
HorizontalDivider(Modifier.padding(vertical = 8.dp))
Row(Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween) {
Text("Total", style = MaterialTheme.typography.titleMedium)
Text("$79.00", style = MaterialTheme.typography.titleMedium)
}
Spacer(Modifier.height(12.dp))
Button(onClick = {}, Modifier.fillMaxWidth()) {
Icon(Icons.Default.CreditCard, null,
modifier = Modifier.size(16.dp))
Text(" Checkout")
}
}
}
}