Cards
25%
SAVE25
Orders over $50
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 CouponVoucherCard() {
var copied by remember { mutableStateOf(false) }
Card(
modifier = Modifier.width(260.dp),
shape = RoundedCornerShape(18.dp),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.tertiaryContainer
)
) {
Row(
Modifier.padding(16.dp),
verticalAlignment = Alignment.CenterVertically
) {
Column(Modifier.weight(1f)) {
Row {
Icon(Icons.Default.Sell, null, modifier = Modifier.size(18.dp))
Text(" SAVE20",
style = MaterialTheme.typography.titleLarge)
}
Text("20% off any order",
style = MaterialTheme.typography.bodySmall)
}
FilledTonalButton(onClick = { copied = true }) {
AnimatedContent(copied, label = "c") {
Text(if (it) "Copied" else "Copy")
}
}
}
}
}