Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
Data displayAndroid

Stat group

Lay out related stats in an adaptive grid.

Public APILumenStatGroupAndroid / Compose

Native example

Use Stat group

Use dividers to join the stats into one frame.

Stat group rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
import androidx.compose.runtime.*
import com.santi020k.lumen.*

@Composable
fun StorePerformance() {
    LumenStatGroup(label = "Store performance") {
        LumenStat(
            label = "Revenue",
            value = "$48.2K",
            trend = LumenStatTrend("12%", LumenStatTrendDirection.Up, LumenMetricTone.Success)
        )
        LumenStat(label = "Orders", value = "1,204")
        LumenStat(label = "Refund rate", value = "1.4%")
    }
}
Android
A named group of store metrics that fits as many 160 dp columns as the width allows.

Reference

Public API

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

APIValues or typeDefaultDescription
label / dividers / minimumWidthgroup name / joined frame / column widthrequired / false / 160Use dividers to join the stats into one frame.

Native behavior

Design and accessibility

When to use it

Use dividers to join the stats into one frame.

Accessibility

Named group; each stat keeps its own summary.

Shared component

Available on other platforms

React NativeApple / SwiftUI Web
Android docsCompose module