Badges
Badgesanimated

Signal strength

A connectivity chip whose bars rise in sequence beside a Wi-Fi glyph.

Connected

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
val t = rememberInfiniteTransition(label = "signal")
val green = Color(0xFF16A34A)
Surface(
    shape = RoundedCornerShape(50),
    color = green.copy(alpha = 0.12f),
    contentColor = green,
) {
    Row(
        Modifier.padding(start = 8.dp, end = 10.dp, top = 4.dp, bottom = 4.dp),
        verticalAlignment = Alignment.Bottom,
        horizontalArrangement = Arrangement.spacedBy(2.dp),
    ) {
        repeat(4) { i ->
            val h by t.animateFloat(
                initialValue = 0.3f,
                targetValue = 1f,
                animationSpec = infiniteRepeatable(
                    tween(900, delayMillis = i * 150),
                    RepeatMode.Reverse,
                ),
                label = "bar",
            )
            Box(
                Modifier
                    .width(3.dp)
                    .height((4 + i * 3).dp)
                    .graphicsLayer { scaleY = h; transformOrigin = TransformOrigin(0.5f, 1f) }
                    .background(green, RoundedCornerShape(2.dp)),
            )
        }
        Spacer(Modifier.width(4.dp))
        Text("Connected", fontSize = 12.sp, fontWeight = FontWeight.Medium)
    }
}