Icons
Iconsanimated

Verified

A security shield whose checkmark draws in to confirm a verified or protected state.

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