Progress Indicators

Progress Indicators

Components that express an unspecified wait time or display the length of a process.


Installation

./gradlew lumo --add ProgressIndicators

Usage

Linear Progress Indicator

// Determinate
LinearProgressIndicator(
    progress = 0.7f,
    color = AppTheme.colors.primary,
    trackColor = AppTheme.colors.surface
)
 
// Indeterminate
LinearProgressIndicator(
    color = AppTheme.colors.primary,
    trackColor = AppTheme.colors.surface
)

Circular Progress Indicator

// Determinate
CircularProgressIndicator(
    progress = 0.7f,
    color = AppTheme.colors.primary,
    trackColor = AppTheme.colors.surface
)
 
// Indeterminate
CircularProgressIndicator(
    color = AppTheme.colors.primary,
    trackColor = AppTheme.colors.surface
)

API Documentation

Progress Indicator Types

ComponentDescription
LinearProgressIndicatorHorizontal progress indicator
CircularProgressIndicatorCircular spinning progress indicator

Linear Progress Indicator Parameters

ParameterTypeDefaultDescription
progressFloat-Progress value (0.0 to 1.0)
modifierModifierModifierModifier for the indicator
colorColorprimaryColor of the progress bar
trackColorColortransparentColor of the track
strokeCapStrokeCapRoundStyle of the line ends

Circular Progress Indicator Parameters

ParameterTypeDefaultDescription
progressFloat-Progress value (0.0 to 1.0)
modifierModifierModifierModifier for the indicator
colorColorprimaryColor of the progress circle
trackColorColortransparentColor of the track
strokeWidthDp4.dpWidth of the progress line
strokeCapStrokeCapSquareStyle of the line ends