Cards
Cards

Hourly Forecast

Scrollable hourly strip pairing temperatures with weather glyphs per hour.

Hourly Forecast
Now21°
1PM22°
2PM23°
3PM22°
4PM20°

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 HourlyForecastCard() {
  data class Hour(val t: String, val deg: String)
  val hours = listOf(
    Hour("Now", "21°"), Hour("1PM", "22°"),
    Hour("2PM", "23°"), Hour("3PM", "22°"),
    Hour("4PM", "20°"), Hour("5PM", "19°")
  )
  OutlinedCard(Modifier.fillMaxWidth()) {
    Column(Modifier.padding(16.dp)) {
      Text(
        "Hourly Forecast",
        style = MaterialTheme.typography.titleMedium
      )
      Spacer(Modifier.height(12.dp))
      LazyRow(
        horizontalArrangement = Arrangement.spacedBy(18.dp)
      ) {
        items(hours) { h ->
          Column(
            horizontalAlignment =
              Alignment.CenterHorizontally
          ) {
            Text(
              h.t,
              style = MaterialTheme.typography.labelSmall,
              color = MaterialTheme.colorScheme
                .onSurfaceVariant
            )
            Spacer(Modifier.height(8.dp))
            Box(
              Modifier.size(20.dp).background(
                MaterialTheme.colorScheme.primary,
                CircleShape
              )
            )
            Spacer(Modifier.height(8.dp))
            Text(
              h.deg,
              style = MaterialTheme.typography.bodyMedium
            )
          }
        }
      }
    }
  }
}