StylishStatistic

fun StylishStatistic(value: String, modifier: Modifier = Modifier, label: String = "", delta: String? = null, deltaPositive: Boolean = true, valueStyle: TextStyle = MaterialTheme.typography.headlineMedium, labelStyle: TextStyle = MaterialTheme.typography.bodySmall, deltaStyle: TextStyle = MaterialTheme.typography.bodySmall, deltaColor: Color = MaterialTheme.colorScheme.primary, contentColor: Color = MaterialTheme.colorScheme.onSurface, horizontalAlignment: Alignment.Horizontal = Alignment.Start)

A labeled metric display — the web "Statistic/Stat" pattern from Ant Design and Chakra UI.

Shows a label above a prominent value, with an optional delta indicator (up/down arrow) for changes.

Parameters

value

The main metric text, e.g. "¥1,200,000".

modifier

Modifier applied to the root column.

label

Optional caption rendered above value.

delta

Optional change text, e.g. "+12.5%". When non-null, shown with a directional arrow.

deltaPositive

Whether delta represents an improvement. When true the delta is tinted with deltaColor; otherwise it is tinted with the error color.

valueStyle

Typography of value. Defaults to MaterialTheme.typography.headlineMedium.

labelStyle

Typography of label. Defaults to MaterialTheme.typography.bodySmall.

deltaStyle

Typography of delta. Defaults to MaterialTheme.typography.bodySmall.

deltaColor

Color of a positive delta. Defaults to MaterialTheme.colorScheme.primary.

contentColor

Color of value. Defaults to MaterialTheme.colorScheme.onSurface.

horizontalAlignment

Alignment of the column contents. Defaults to Alignment.Start.