androidx.compose.material3

CircularWavyProgressIndicatorSince 1.10

Composable function

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

An Expressive ring 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 CircularWavyProgressIndicator(
    progress: () -> Float,
    modifier: Modifier = Modifier,
    color: Color = WavyProgressIndicatorDefaults.indicatorColor,
    trackColor: Color = WavyProgressIndicatorDefaults.trackColor,
    stroke: Stroke = WavyProgressIndicatorDefaults.circularIndicatorStroke,
    trackStroke: Stroke = WavyProgressIndicatorDefaults.circularTrackStroke,
    gapSize: Dp = WavyProgressIndicatorDefaults.CircularIndicatorTrackGapSize,
    amplitude: (progress: Float) -> Float = WavyProgressIndicatorDefaults.indicatorAmplitude,
    wavelength: Dp = WavyProgressIndicatorDefaults.CircularWavelength,
    waveSpeed: Dp = wavelength,
)

stroke: StrokeOptional

Default: WavyProgressIndicatorDefaults.circularIndicatorStroke

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

trackStroke: StrokeOptional

Default: WavyProgressIndicatorDefaults.circularTrackStroke

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

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

Default: WavyProgressIndicatorDefaults.CircularWavelength

The length of one wave.

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 CircularWavyProgressIndicator(
    modifier: Modifier = Modifier,
    color: Color = WavyProgressIndicatorDefaults.indicatorColor,
    trackColor: Color = WavyProgressIndicatorDefaults.trackColor,
    stroke: Stroke = WavyProgressIndicatorDefaults.circularIndicatorStroke,
    trackStroke: Stroke = WavyProgressIndicatorDefaults.circularTrackStroke,
    gapSize: Dp = WavyProgressIndicatorDefaults.CircularIndicatorTrackGapSize,
    amplitude: Float = 1f,
    wavelength: Dp = WavyProgressIndicatorDefaults.CircularWavelength,
    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