Cards
Cardsanimated

Radio Station

Live radio station card with a pulsing on-air dot and frequency label.

Wave 101
101.7 FM
LIVE

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 RadioStation(name: String, freq: String) {
  val pulse by rememberInfiniteTransition(label = "p")
    .animateFloat(
      initialValue = 0.4f,
      targetValue = 1f,
      animationSpec = infiniteRepeatable(
        tween(800), RepeatMode.Reverse,
      ),
      label = "dot",
    )
  Card(
    shape = RoundedCornerShape(20.dp),
    modifier = Modifier.fillMaxWidth(),
  ) {
    Row(
      verticalAlignment = Alignment.CenterVertically,
      modifier = Modifier.padding(16.dp),
    ) {
      Icon(
        Icons.Default.Radio,
        contentDescription = null,
        modifier = Modifier.size(40.dp),
        tint = MaterialTheme.colorScheme.primary,
      )
      Spacer(Modifier.width(14.dp))
      Column(Modifier.weight(1f)) {
        Text(name, style = MaterialTheme.typography.titleMedium)
        Text(freq, style = MaterialTheme.typography.bodySmall)
      }
      Row(verticalAlignment = Alignment.CenterVertically) {
        Box(
          modifier = Modifier
            .size(8.dp)
            .graphicsLayer { alpha = pulse }
            .clip(CircleShape)
            .background(Color(0xFFEF4444)),
        )
        Spacer(Modifier.width(6.dp))
        Text("LIVE", color = Color(0xFFEF4444))
      }
    }
  }
}