Cards
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 NewFollowerToastCard() {
var visible by remember { mutableStateOf(false) }
LaunchedEffect(Unit) { visible = true }
AnimatedVisibility(
visible = visible,
enter = slideInHorizontally { it } + fadeIn()
) {
Surface(
modifier = Modifier.width(280.dp),
shape = RoundedCornerShape(16.dp),
tonalElevation = 4.dp
) {
Row(
Modifier.padding(14.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
Icons.Default.PersonAdd,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary
)
Spacer(Modifier.width(12.dp))
Column(Modifier.weight(1f)) {
Text(
"Dev Rao",
style =
MaterialTheme.typography.titleSmall
)
Text(
"started following you",
style =
MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme
.onSurfaceVariant
)
}
}
}
}
}