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 SoldOutCard() {
Card(
modifier = Modifier.width(240.dp),
shape = RoundedCornerShape(18.dp)
) {
Box {
Box(
Modifier
.fillMaxWidth()
.height(140.dp)
.background(MaterialTheme.colorScheme.surfaceVariant)
)
Box(
Modifier
.matchParentSize()
.background(Color.Black.copy(alpha = 0.45f)),
contentAlignment = Alignment.Center
) {
Surface(
color = MaterialTheme.colorScheme.surface,
shape = RoundedCornerShape(8.dp)
) {
Text("SOLD OUT",
Modifier.padding(horizontal = 12.dp, vertical = 6.dp),
style = MaterialTheme.typography.labelLarge)
}
}
}
Column(Modifier.padding(16.dp)) {
Text("Canvas Tote", style = MaterialTheme.typography.titleMedium)
OutlinedButton(onClick = {}, Modifier.fillMaxWidth()) {
Icon(Icons.Default.Notifications, null,
modifier = Modifier.size(16.dp))
Text(" Notify me")
}
}
}
}