Cards
Cardsanimated

Packing Checklist

Packing list card with animated check marks and live progress count.

Packed 2 / 4
Passport
Charger
Sunscreen
Camera

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 PackingChecklistCard() {
  val items = remember {
    mutableStateListOf("Passport" to true,
      "Charger" to true, "Sunscreen" to false,
      "Camera" to false)
  }
  ElevatedCard(
    modifier = Modifier.fillMaxWidth().padding(16.dp)
  ) {
    Column(Modifier.padding(20.dp)) {
      val done = items.count { it.second }
      Text(
        "Packed $done / ${items.size}",
        style = MaterialTheme.typography.titleMedium
      )
      Spacer(Modifier.height(10.dp))
      items.forEachIndexed { i, (t, c) ->
        Row(
          Modifier.fillMaxWidth().clickable {
            items[i] = t to !c
          },
          verticalAlignment = Alignment.CenterVertically
        ) {
          val tick by animateFloatAsState(
            if (c) 1f else 0f, label = "t"
          )
          Canvas(Modifier.size(18.dp)) {
            drawCircle(
              Color(0xFF10B981).copy(alpha = tick),
              size.minDimension / 2
            )
          }
          Spacer(Modifier.width(10.dp))
          Text(t, style = MaterialTheme.typography.bodyMedium)
        }
      }
    }
  }
}