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 NewArrivalCard() {
Card(
modifier = Modifier.width(240.dp),
shape = RoundedCornerShape(18.dp)
) {
Box {
Box(
Modifier
.fillMaxWidth()
.height(140.dp)
.background(MaterialTheme.colorScheme.surfaceVariant)
)
Surface(
color = MaterialTheme.colorScheme.primary,
modifier = Modifier
.align(Alignment.TopStart)
.offset((-20).dp, 16.dp)
.rotate(-45f)
) {
Row(Modifier.padding(horizontal = 28.dp, vertical = 4.dp)) {
Icon(Icons.Default.AutoAwesome, null,
modifier = Modifier.size(12.dp),
tint = MaterialTheme.colorScheme.onPrimary)
Text(" NEW", color = MaterialTheme.colorScheme.onPrimary,
style = MaterialTheme.typography.labelSmall)
}
}
}
Text("Linen Shirt", Modifier.padding(16.dp),
style = MaterialTheme.typography.titleMedium)
}
}