Cards
<Card className="w-60 mx-auto">
<CardContent className="flex flex-col items-center gap-2 p-5">
<Loader className="size-8 text-primary animate-spin" />
<span className="text-sm font-semibold text-foreground">Processing payment…</span>
<span className="text-xs text-muted-foreground">$49.00 · Visa ••42</span>
</CardContent>
</Card>
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 ProcessingPayment(done: Boolean) {
Card(
shape = RoundedCornerShape(16.dp),
modifier = Modifier.padding(12.dp)
) {
Column(
modifier = Modifier.padding(20.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(10.dp)
) {
Crossfade(targetState = done, label = "pay") { ok ->
if (ok) {
Icon(
Icons.Rounded.CheckCircle,
contentDescription = null,
tint = Color(0xFF22C55E),
modifier = Modifier.size(34.dp)
)
} else {
CircularProgressIndicator(
modifier = Modifier.size(34.dp),
strokeWidth = 3.dp
)
}
}
Text(if (done) "Payment confirmed" else "Processing payment…")
Text(
"${'$'}49.00 · Visa ••42",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}