JengaStatusPill

fun JengaStatusPill(label: String, modifier: Modifier = Modifier, tone: JengaBadgeTone = JengaBadgeTone.Neutral, loading: Boolean = false, onClick: () -> Unit? = null, colors: JengaStatusPillColors = JengaStatusPillDefaults.colors(tone), showDot: Boolean = true, indicatorSize: Dp = JengaTheme.components.statusPill?.indicatorSize ?: JengaStatusPillDefaults.IndicatorSize, minHeight: Dp = JengaTheme.components.statusPill?.minHeight ?: JengaStatusPillDefaults.MinHeight, contentPadding: PaddingValues = JengaStatusPillDefaults.contentPadding, textStyle: TextStyle = JengaStatusPillDefaults.textStyle, leadingIcon: @Composable () -> Unit? = null)(source)

A compact status pill: a leading dot (or a spinner while loading) plus a short label, tinted by tone. Use it for live, glanceable state (connectivity, sync, gate health) anywhere a io.github.joelkanyi.jenga.component.badge.JengaBadge is too static. Optionally onClickable to open details.

Parameters

label

the status text.

modifier

the Modifier for this pill.

tone

the semantic tone driving its colors.

loading

when true, the leading dot becomes a small spinner.

onClick

optional tap handler (e.g. open a details sheet).

colors

the color set; defaults to JengaStatusPillDefaults.colors for tone.

showDot

whether the leading dot is shown; the spinner still shows while loading.

indicatorSize

diameter of the leading dot or spinner.

minHeight

the minimum pill height.

contentPadding

padding inside the pill.

textStyle

the label text style.

leadingIcon

optional icon before the label, tinted with the accent color; replaces the dot. The spinner still shows while loading.

Samples

JengaStatusPill(
    label = "Synced",
    tone = JengaBadgeTone.Success,
)