Cards
<Card className="w-64 mx-auto">
<CardContent className="flex items-center gap-3 p-4">
<Cloud className="size-5 text-primary" />
<div className="flex flex-col">
<span className="text-sm font-semibold text-foreground">Update available</span>
<span className="text-xs text-muted-foreground">v2.4.0 · 18 MB</span>
</div>
<Button className="ml-auto text-xs">Update</Button>
</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 UpdateAvailable(onUpdate: () -> Unit) {
ElevatedCard(
shape = RoundedCornerShape(16.dp),
modifier = Modifier.padding(12.dp)
) {
Row(
modifier = Modifier.padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(12.dp)
) {
Icon(
Icons.Rounded.CloudDownload,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary
)
Column(Modifier.weight(1f)) {
Text(
"Update available",
style = MaterialTheme.typography.titleSmall
)
Text(
"v2.4.0 · 18 MB",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Button(onClick = onUpdate) { Text("Update") }
}
}
}