Skip to content

Component

LoadingIndicator

A FormaUI loading indicator — circular or linear, determinate or indeterminate — delegating to Material 3's progress indicators.

dev.formaui.components.loading

Circular indeterminateCircular determinateLinear indeterminateLinear determinate

Preview

This toggle is site chrome only — the preview has its own light/dark switch inside.

Live preview

Live preview — ~37 MB development build

Usage

Column(verticalArrangement = Arrangement.spacedBy(FormaTheme.spacing.md)) {
    FormaLoadingIndicator(contentDescription = "Loading")
    FormaLoadingIndicator(progress = 0.6f, contentDescription = "60 percent loaded")
    FormaLoadingIndicator(
        modifier = Modifier.fillMaxWidth(),
        variant = FormaLoadingIndicatorVariant.Linear,
        contentDescription = "Loading",
    )
}

FormaLoadingIndicator

Circular or linear progress indicator; indeterminate when progress is null, determinate for a 0f..1f fraction.

modifierTypeModifierDefaultModifierDescriptionthe Modifier applied to the indicator.
variantTypeFormaLoadingIndicatorVariantDefaultFormaLoadingIndicatorVariant.CircularDescriptioncircular or linear (defaults to FormaLoadingIndicatorVariant.Circular).
progressTypeFloat?DefaultnullDescriptionthe completion fraction 0f..1f, or null for an indeterminate indicator.
contentDescriptionTypeString?DefaultnullDescriptionoptional accessibility description of what is loading.

Supporting API

FormaLoadingIndicatorVariantenum
The indicator's shape: Circular, Linear.

Accessibility

Supply contentDescription (e.g. "Loading transactions") so screen readers announce the busy state; a bare indicator is otherwise silent.