androidx.compose.material3

LinearWavyProgressIndicatorSince 1.10

Composable function

One of the progress indicator types. It works like LinearProgressIndicator. Only the parameters that differ are described here.

An Expressive bar with a wavy line.

Wavy indicatorsExpressive theme
Wavy indicators
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 LinearWavyProgressIndicator(
    progress: () -> Float,
    modifier: Modifier = Modifier,
    color: Color = WavyProgressIndicatorDefaults.indicatorColor,
    trackColor: Color = WavyProgressIndicatorDefaults.trackColor,
    stroke: Stroke = WavyProgressIndicatorDefaults.linearIndicatorStroke,
    trackStroke: Stroke = WavyProgressIndicatorDefaults.linearTrackStroke,
    gapSize: Dp = WavyProgressIndicatorDefaults.LinearIndicatorTrackGapSize,
    stopSize: Dp = WavyProgressIndicatorDefaults.LinearTrackStopIndicatorSize,
    amplitude: (progress: Float) -> Float = WavyProgressIndicatorDefaults.indicatorAmplitude,
    wavelength: Dp = WavyProgressIndicatorDefaults.LinearDeterminateWavelength,
    waveSpeed: Dp = wavelength,
)

stroke: StrokeOptional

Default: WavyProgressIndicatorDefaults.linearIndicatorStroke

The line style of the filled part of a wavy indicator.

trackStroke: StrokeOptional

Default: WavyProgressIndicatorDefaults.linearTrackStroke

The line style of the empty part of a wavy indicator.

stopSize: DpOptional

Default: WavyProgressIndicatorDefaults.LinearTrackStopIndicatorSize

The size of the dot at the end of the track.

amplitude: (progress: Float) -> FloatOptional

Default: WavyProgressIndicatorDefaults.indicatorAmplitude

How high the waves are. As a function, it can change with progress, for example flat at 0 and 1.

wavelength: DpOptional

waveSpeed: DpOptional

Default: wavelength

How fast the waves move. Default: one wavelength per cycle.

Defaults that differ from LinearProgressIndicator:

Same as in LinearProgressIndicator: progress, modifier, color, trackColor, gapSize.

Unknown progress

No progress. Moves in a loop.

@Composable
fun LinearWavyProgressIndicator(
    modifier: Modifier = Modifier,
    color: Color = WavyProgressIndicatorDefaults.indicatorColor,
    trackColor: Color = WavyProgressIndicatorDefaults.trackColor,
    stroke: Stroke = WavyProgressIndicatorDefaults.linearIndicatorStroke,
    trackStroke: Stroke = WavyProgressIndicatorDefaults.linearTrackStroke,
    gapSize: Dp = WavyProgressIndicatorDefaults.LinearIndicatorTrackGapSize,
    amplitude: Float = 1f,
    wavelength: Dp = WavyProgressIndicatorDefaults.LinearIndeterminateWavelength,
    waveSpeed: Dp = wavelength,
)

amplitude: FloatOptional

Default: 1f

How high the waves are. As a function, it can change with progress, for example flat at 0 and 1.

Defaults that differ from LinearProgressIndicator:

Same as in LinearProgressIndicator: modifier, color, trackColor, gapSize.

Same as above: stroke, trackStroke, wavelength, waveSpeed.

Progress indicator types