OudsLinearProgressIndicator

fun OudsLinearProgressIndicator(progress: () -> Float, modifier: Modifier = Modifier, status: OudsProgressIndicatorStatus = OudsProgressIndicatorDefaults.Status, track: Boolean = true, stopIndicator: Boolean = false, helperText: String? = null)

A Linear Progress Indicator shows the progress of a task using a horizontal line. It can show a specific value (determinate) or just that something is in progress (indeterminate). Best used inside layouts to show progress.

This version of the linear progress indicator is determinate. Use the other signature for an indeterminate progress.

Design

NameProgress Indicator
Version0.1.0

Parameters

progress

The progress of this indicator, where 0.0 represents no progress and 1.0 represents full progress. Values outside of this range are coerced into the range.

modifier

The Modifier to be applied to this linear progress indicator.

status

The status of the progress indicator. Its color is based on this status. See OudsProgressIndicatorStatus for allowed values.

track

Whether the track is displayed or not. Use true when the indicator is shown on its own and needs a clear structure. The track helps define the full range of progress and makes the value easier to read (for determinate variant). Use false when the indicator is embedded inside another component (e.g. button, tag, toast). Also use it when a more minimal and lightweight appearance is needed.

stopIndicator

Whether a stop indicator is displayed or not. It allows to identify the end of the track easily. To respect accessibility criteria, it is required if the track has a contrast below 3:1 with its container or the surface behind the container.

helperText

Optional additional text displayed with the progress indicator. Helper text can provide context about the process or show the current progress value.

Samples

OudsLinearProgressIndicator(
    progress = { 0.75f },
    helperText = "Loading 75%"
)

fun OudsLinearProgressIndicator(modifier: Modifier = Modifier, status: OudsProgressIndicatorStatus = OudsProgressIndicatorDefaults.Status, track: Boolean = true, stopIndicator: Boolean = false, helperText: String? = null)

A Linear Progress Indicator shows the progress of a task using a horizontal line. It can show a specific value (determinate) or just that something is in progress (indeterminate). Best used inside layouts to show progress.

This version of the linear progress indicator is indeterminate. Use the other signature for a determinate progress.

Design

NameProgress Indicator
Version0.1.0

Parameters

modifier

The Modifier to be applied to this linear progress indicator.

status

The status of the progress indicator. Its color is based on this status. See OudsProgressIndicatorStatus for allowed values.

track

Whether the track is displayed or not. Use true when the indicator is shown on its own and needs a clear structure. The track helps define the full range of progress and makes the value easier to read (for determinate variant). Use false when the indicator is embedded inside another component (e.g. button, tag, toast). Also use it when a more minimal and lightweight appearance is needed.

stopIndicator

Whether a stop indicator is displayed or not. It allows to identify the end of the track easily. To respect accessibility criteria, it is required if the track has a contrast below 3:1 with its container or the surface behind the container.

helperText

Optional additional text displayed with the progress indicator. Helper text can provide context about the process or show the current progress value.

Samples

OudsLinearProgressIndicator(
    helperText = "Loading..."
)