JengaLabelledProgress

fun JengaLabelledProgress(progress: Float, label: AnnotatedString, modifier: Modifier = Modifier, valueLabel: String? = null, tone: JengaProgressTone = JengaProgressTone.Default, colors: JengaProgressColors = JengaProgressDefaults.colors(tone), trackHeight: Dp = JengaProgressDefaults.trackHeight(), shape: Shape = JengaProgressDefaults.shape, labelStyle: TextStyle = JengaProgressDefaults.labelStyle, spacing: Dp = JengaProgressDefaults.labelSpacing, animationSpec: AnimationSpec<Float> = JengaProgressDefaults.animationSpec)(source)

A determinate progress bar with a label row above it: label at the start (e.g. the current step, with a styled part) and an optional valueLabel at the end (e.g. "60%").

Parameters

progress

the progress in 0f..1f (coerced into range).

label

the start label.

modifier

the Modifier for this block.

valueLabel

optional end label.

tone

the bar tone; see JengaProgressTone.

colors

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

trackHeight

the bar height; defaults to the theme's JengaProgressStyle.trackHeight, else JengaProgressDefaults.TrackHeight.

shape

the track and indicator shape.

labelStyle

the label text style.

spacing

the gap between the label row and the bar.

animationSpec

how the indicator animates to a new progress.

Samples

JengaLabelledProgress(
    progress = 0.6f,
    label = AnnotatedString(
        text = "Repair ยท step 3 of 5",
    ),
    valueLabel = "60%",
)