androidx.compose.material3
LinearProgressIndicator
Composable function
A progress indicator shows that something is happening. There are two kinds:
- Known progress: pass
progress, a value from 0 to 1. Use it for downloads or uploads. - Unknown progress: leave
progressout. It moves in a loop. Use it when you can't tell how long it takes.
There are linear and circular versions, and wavy versions from Expressive. See Progress indicator types.

Column(Modifier.width(280.dp), verticalArrangement = Arrangement.spacedBy(24.dp)) {
LinearProgressIndicator(progress = { 0.6f }, modifier = Modifier.width(280.dp))
LinearProgressIndicator(modifier = Modifier.width(280.dp))
}

Row(horizontalArrangement = Arrangement.spacedBy(24.dp)) {
CircularProgressIndicator(progress = { 0.6f })
CircularProgressIndicator()
}

Row(horizontalArrangement = Arrangement.spacedBy(24.dp), verticalAlignment = Alignment.CenterVertically) {
LinearWavyProgressIndicator(progress = { 0.6f }, modifier = Modifier.width(200.dp))
CircularWavyProgressIndicator(progress = { 0.6f })
}
Known progress
Takes progress. Fills from 0 to 1.
@Composable
fun LinearProgressIndicator(
progress: () -> Float,
modifier: Modifier = Modifier,
color: Color = ProgressIndicatorDefaults.linearColor,
trackColor: Color = ProgressIndicatorDefaults.linearTrackColor,
strokeCap: StrokeCap = ProgressIndicatorDefaults.LinearStrokeCap,
gapSize: Dp = ProgressIndicatorDefaults.LinearIndicatorTrackGapSize,
drawStopIndicator: DrawScope.() -> Unit = { drawStopIndicator(drawScope = this, stopSize = ProgressIndicatorDefaults.LinearTrackStopIndicatorSize, color = color, strokeCap = strokeCap) },
)
progress: () -> FloatRequired
progress: () -> FloatRequiredA function that returns how far the task is, from 0 to 1. It is a function, so the indicator can read it often without recomposing the screen.
modifier: ModifierOptional
modifier: ModifierOptionalDefault: Modifier
Changes size, padding, or position. Set the width of a linear indicator here.
color: ColorOptional
color: ColorOptionalDefault: ProgressIndicatorDefaults.linearColor
The color of the filled part. Default: the theme's primary.

LinearProgressIndicator(
progress = { 0.4f },
color = MaterialTheme.colorScheme.tertiary,
trackColor = MaterialTheme.colorScheme.tertiaryContainer,
strokeCap = StrokeCap.Round,
modifier = Modifier.width(280.dp).height(8.dp),
)
trackColor: ColorOptional
trackColor: ColorOptionalDefault: ProgressIndicatorDefaults.linearTrackColor
The color of the empty part.
strokeCap: StrokeCapOptional
strokeCap: StrokeCapOptionalDefault: ProgressIndicatorDefaults.LinearStrokeCap
The shape of the line ends: round or square.
gapSize: DpOptional
gapSize: DpOptionalDefault: ProgressIndicatorDefaults.LinearIndicatorTrackGapSize
The gap between the filled part and the empty part.
drawStopIndicator: DrawScope.() -> UnitOptional
drawStopIndicator: DrawScope.() -> UnitOptionalDefault: { drawStopIndicator(drawScope = this, stopSize = ProgressIndicatorDefaults.LinearTrackStopIndicatorSize, color = color, strokeCap = strokeCap) }
Draws the small dot at the end of the track. Pass {} to hide it.
Unknown progress
No progress. Moves in a loop.
@Composable
fun LinearProgressIndicator(
modifier: Modifier = Modifier,
color: Color = ProgressIndicatorDefaults.linearColor,
trackColor: Color = ProgressIndicatorDefaults.linearTrackColor,
strokeCap: StrokeCap = ProgressIndicatorDefaults.LinearStrokeCap,
gapSize: Dp = ProgressIndicatorDefaults.LinearIndicatorTrackGapSize,
)
Same as above: modifier, color, trackColor, strokeCap, gapSize.
Progress indicator types
LinearProgressIndicatorCircularProgressIndicatorLinearWavyProgressIndicatorCircularWavyProgressIndicator