Cards
<Card className="w-64 mx-auto bg-secondary">
<CardContent className="flex items-center gap-3 p-4">
<Settings className="size-5 text-secondary-foreground animate-spin [animation-duration:4s]" />
<div className="flex flex-col">
<span className="text-sm font-semibold text-secondary-foreground">Scheduled maintenance</span>
<span className="text-xs text-secondary-foreground/70">Sat 2:00–4:00 AM UTC</span>
</div>
</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 MaintenanceNotice() {
val angle by rememberInfiniteTransition().animateFloat(
initialValue = 0f,
targetValue = 360f,
animationSpec = infiniteRepeatable(
tween(4000, easing = LinearEasing)
)
)
Surface(
shape = RoundedCornerShape(14.dp),
color = MaterialTheme.colorScheme.secondaryContainer,
modifier = Modifier.padding(12.dp)
) {
Row(
modifier = Modifier.padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(12.dp)
) {
Icon(
Icons.Rounded.Settings,
contentDescription = null,
modifier = Modifier.rotate(angle),
tint = MaterialTheme.colorScheme.onSecondaryContainer
)
Column {
Text("Scheduled maintenance")
Text(
"Sat 2:00–4:00 AM UTC",
style = MaterialTheme.typography.bodySmall
)
}
}
}
}