Cards
Cardsanimated

Loan Progress

Loan payoff card with a horizontal progress bar advancing toward full repayment.

Car Loan62%
$12,400 of $20,000 paid

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 LoanProgressCard() {
  val p = remember { Animatable(0f) }
  LaunchedEffect(Unit) {
    p.animateTo(0.62f, tween(1200, easing = FastOutSlowInEasing))
  }
  Card(
    modifier = Modifier.fillMaxWidth().padding(16.dp),
    shape = RoundedCornerShape(20.dp)
  ) {
    Column(Modifier.padding(20.dp)) {
      Row(verticalAlignment = Alignment.CenterVertically) {
        Icon(Icons.Filled.Landmark, null,
          modifier = Modifier.size(20.dp))
        Spacer(Modifier.width(8.dp))
        Text("Car Loan",
          style = MaterialTheme.typography.titleSmall,
          fontWeight = FontWeight.SemiBold)
        Spacer(Modifier.weight(1f))
        Text("${(p.value * 100).toInt()}%",
          fontWeight = FontWeight.Bold)
      }
      Spacer(Modifier.height(14.dp))
      Box(
        Modifier.fillMaxWidth().height(10.dp)
          .clip(RoundedCornerShape(5.dp))
          .background(MaterialTheme.colorScheme.surfaceVariant)
      ) {
        Box(
          Modifier.fillMaxWidth(p.value).fillMaxHeight()
            .clip(RoundedCornerShape(5.dp))
            .background(MaterialTheme.colorScheme.primary)
        )
      }
      Spacer(Modifier.height(10.dp))
      Text("$12,400 of $20,000 paid",
        style = MaterialTheme.typography.bodySmall,
        color = MaterialTheme.colorScheme.onSurfaceVariant)
    }
  }
}