Cards
Cardsanimated

Subscription Cost

Subscription card listing services with a total bar that fills on mount.

Subscriptions
Netflix $15
Spotify $10
iCloud $3
$28 / month

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 SubscriptionCostCard() {
  val fill = remember { Animatable(0f) }
  LaunchedEffect(Unit) { fill.animateTo(1f, tween(900)) }
  Card(
    modifier = Modifier.fillMaxWidth().padding(16.dp),
    shape = RoundedCornerShape(20.dp)
  ) {
    Column(Modifier.padding(18.dp)) {
      Row(verticalAlignment = Alignment.CenterVertically) {
        Icon(Icons.Filled.CreditCard, null,
          modifier = Modifier.size(18.dp))
        Spacer(Modifier.width(8.dp))
        Text("Subscriptions",
          style = MaterialTheme.typography.titleSmall,
          fontWeight = FontWeight.SemiBold)
      }
      Spacer(Modifier.height(12.dp))
      listOf("Netflix $15", "Spotify $10", "iCloud $3").forEach {
        Text(it, style = MaterialTheme.typography.bodySmall,
          modifier = Modifier.padding(vertical = 3.dp),
          color = MaterialTheme.colorScheme.onSurfaceVariant)
      }
      Spacer(Modifier.height(10.dp))
      Box(
        Modifier.fillMaxWidth().height(8.dp)
          .clip(RoundedCornerShape(4.dp))
          .background(MaterialTheme.colorScheme.surfaceVariant)
      ) {
        Box(
          Modifier.fillMaxWidth(fill.value).fillMaxHeight()
            .background(MaterialTheme.colorScheme.primary)
        )
      }
      Spacer(Modifier.height(8.dp))
      Text("$28 / month", fontWeight = FontWeight.Bold)
    }
  }
}