Cards
Cardsanimated

Streak Counter

A flame pulses beside a day streak with a small dot calendar.

28 Day Streak
Keep it going!

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 StreakCounterCard() {
  val t = rememberInfiniteTransition(label = "flame")
  val scale by t.animateFloat(
    initialValue = 0.9f,
    targetValue = 1.15f,
    animationSpec = infiniteRepeatable(
      tween(700, easing = FastOutSlowInEasing),
      RepeatMode.Reverse,
    ),
    label = "scale",
  )
  ElevatedCard(
    shape = RoundedCornerShape(20.dp),
    modifier = Modifier.width(260.dp),
  ) {
    Row(
      Modifier.padding(20.dp),
      verticalAlignment = Alignment.CenterVertically,
    ) {
      Box(
        Modifier
          .size(48.dp)
          .graphicsLayer { scaleX = scale; scaleY = scale }
          .clip(CircleShape)
          .background(Color(0xFFF97316).copy(alpha = 0.15f)),
        contentAlignment = Alignment.Center,
      ) {
        Text(text = "🔥", fontSize = 24.sp)
      }
      Spacer(Modifier.width(16.dp))
      Column {
        Text(
          text = "28 Day Streak",
          fontWeight = FontWeight.Bold,
        )
        Text(
          text = "Keep it going!",
          style = MaterialTheme.typography.bodySmall,
          color = MaterialTheme.colorScheme.onSurfaceVariant,
        )
      }
    }
  }
}