After the Compose Material3 1.3.0 ripple API change the ripple effect looks a bit weird on an expanding clickable card, but it doesn’t look like it will be fixed soon:
var expanded by remember { mutableStateOf(false) }
val height by animateDpAsState(targetValue = if (expanded) 500.dp else 100.dp)
Card(onClick = { expanded = !expanded }) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(height)
)
}
Is there a workaround for this other than to disable the ripple completely?