Icons
Iconsanimated

Calendar

A calendar whose date cell pops and a check strokes in to confirm a scheduled event.

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 CalendarConfirm(done: Boolean) {
    val p by animateFloatAsState(if (done) 1f else 0f, tween(500, easing = EaseOutCubic), label = "cal")
    val color = MaterialTheme.colorScheme.primary
    Box(Modifier.size(40.dp), contentAlignment = Alignment.Center) {
        Icon(Icons.Filled.CalendarToday, null, tint = color.copy(alpha = 0.3f), modifier = Modifier.size(30.dp))
        Canvas(Modifier.size(30.dp)) {
            val tick = Path().apply { moveTo(size.width*0.36f, size.height*0.62f); lineTo(size.width*0.46f, size.height*0.72f); lineTo(size.width*0.66f, size.height*0.5f) }
            val m = PathMeasure().apply { setPath(tick, false) }
            drawPath(Path().also { m.getSegment(0f, m.length * p, it, true) }, color, style = Stroke(2.5.dp.toPx(), cap = StrokeCap.Round, join = StrokeJoin.Round))
        }
    }
}