Jenga Labelled Progress
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.
value Label
optional end label.
tone
the bar tone; see JengaProgressTone.
colors
the color set; defaults to JengaProgressDefaults.colors for tone.
track Height
the bar height; defaults to the theme's JengaProgressStyle.trackHeight, else JengaProgressDefaults.TrackHeight.
shape
the track and indicator shape.
label Style
the label text style.
spacing
the gap between the label row and the bar.
animation Spec
how the indicator animates to a new progress.
Samples
JengaLabelledProgress(
progress = 0.6f,
label = AnnotatedString(
text = "Repair ยท step 3 of 5",
),
valueLabel = "60%",
)Content copied to clipboard