Icons
Iconsanimated

Alarm

An alarm clock that rattles side to side as it rings, with twin bells shaking on top.

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 AlarmRinging(ringing: Boolean) {
    val shake by rememberInfiniteTransition(label = "al").animateFloat(
        -8f, 8f, infiniteRepeatable(tween(90, easing = LinearEasing), RepeatMode.Reverse), label = "s")
    Icon(Icons.Filled.Alarm, "Alarm", tint = MaterialTheme.colorScheme.primary,
        modifier = Modifier.size(32.dp).graphicsLayer { rotationZ = if (ringing) shake else 0f })
}