Cards
Cardsanimated
Size Selector Chips
Product card with selectable size chips that animate on active pick.
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 SizeSelectorCard() {
var sel by remember { mutableStateOf("M") }
val sizes = listOf("S", "M", "L", "XL")
Card(
modifier = Modifier.width(240.dp),
shape = RoundedCornerShape(18.dp)
) {
Column(Modifier.padding(16.dp)) {
Text("Running Tee", style = MaterialTheme.typography.titleMedium)
Text("Select size",
style = MaterialTheme.typography.bodySmall)
Spacer(Modifier.height(10.dp))
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
sizes.forEach { s ->
val active = s == sel
FilterChip(
selected = active,
onClick = { sel = s },
label = { Text(s) }
)
}
}
}
}
}