Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
Data displayWear OS

Wearable metric

Present one at-a-glance wearable label, value, and optional detail.

Public APILumenWearMetricWear OS / Compose

Wear OS availability

Use the dedicated Wear artifact

Add com.santi020k:lumen-compose-wear:6.0.0 to your Wear OS module and import this component from com.santi020k.lumen. Wrap content in LumenWearTheme, which defaults to dark appearance and uses LumenThemeScope for tokens, named themes, typography, shapes, and androidx.compose.material3.MaterialTheme roles. Your separate Wear Material provider remains application-owned. Wear UI primitives accept a Compose modifier with Modifier as its default.

The release plan targets this version; confirm Maven Central availability before pinning it.

Native example

Use Wearable metric

Use for one high-priority value with a short label. Avoid dashboard grids that overload small round screens.

Wearable metric rendered in the Wear OS emulator Lumen playground
Captured exampleWear OS emulator
kotlin
@Composable
fun DurationMetric(elapsed: String) {
    LumenWearMetric(label = "Duration", value = elapsed, tone = LumenWearTone.Brand)
}

Reference

Public API

The primary shared and platform-specific options exposed by LumenWearMetric.

APIValues or typeDefaultDescription
labelStringRequiredNames the metric.
valueStringRequiredProvides the formatted value.
detailString?nullAdds brief supporting context. Wear OS omits null, empty, or blank detail.
toneLumenWearToneLumenWearTone.NeutralApplies brand, accent, success, warning, danger, or neutral value color.

Native behavior

Design and accessibility

When to use it

Use for one high-priority value with a short label. Avoid dashboard grids that overload small round screens.

Accessibility

Combines label, value, and optional detail into one readable metric on watchOS and Wear OS. Keep the formatted value concise and localize the label and detail.

Shared component

Available on other platforms

Apple / SwiftUI
Android docsCompose module