Cards
<Card className="w-64 mx-auto">
<CardContent className="flex items-center gap-3 p-4">
<RefreshCw className="size-5 text-primary animate-spin" />
<span className="text-sm text-foreground">Syncing…</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 SyncToCheck(done: Boolean) {
Card(
shape = RoundedCornerShape(14.dp),
modifier = Modifier.padding(12.dp)
) {
Row(
modifier = Modifier.padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(12.dp)
) {
Crossfade(targetState = done, label = "sync") { finished ->
if (finished) {
Icon(
Icons.Rounded.CheckCircle,
contentDescription = null,
tint = Color(0xFF22C55E)
)
} else {
CircularProgressIndicator(
strokeWidth = 2.dp,
modifier = Modifier.size(22.dp)
)
}
}
Text(if (done) "Synced just now" else "Syncing…")
}
}
}