Cards
<Card className="w-64 mx-auto">
<CardContent className="flex items-center gap-3 p-4">
<Server className="size-5 text-foreground" />
<div className="flex flex-col">
<span className="text-sm font-semibold text-foreground">All systems operational</span>
<span className="text-xs text-muted-foreground">99.98% uptime</span>
</div>
<span className="ml-auto size-2.5 rounded-full bg-emerald-500 animate-pulse" />
</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 SystemHealth() {
val pulse by rememberInfiniteTransition().animateFloat(
initialValue = 0.4f,
targetValue = 1f,
animationSpec = infiniteRepeatable(
tween(1000), RepeatMode.Reverse
)
)
Card(
shape = RoundedCornerShape(14.dp),
modifier = Modifier.padding(12.dp)
) {
Row(
modifier = Modifier.padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(12.dp)
) {
Icon(Icons.Rounded.Dns, contentDescription = null)
Column(Modifier.weight(1f)) {
Text("All systems operational")
Text(
"99.98% uptime",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Box(
Modifier
.size(10.dp)
.background(
Color(0xFF22C55E).copy(alpha = pulse),
CircleShape
)
)
}
}
}