# LoadingIndicator

> LoadingIndicator from Material 3 Compose (`androidx.compose.material3:material3`) for Jetpack Compose, with a code sample.

- Library: [Material 3 Compose](https://composables.com/material-components/material-3-compose.md)
- Category: [Material 3 Expressive](https://composables.com/material-components/material-3-expressive.md)
- API reference and more examples: [LoadingIndicator](https://composables.com/jetpack-compose/androidx.compose.material3/material3/components/LoadingIndicator/api.md)

## Code

```kotlin
@Composable
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
fun DeterminateLoadingIndicatorSample() {
    val sliderState = rememberSliderState()
    val animatedProgress by
        animateFloatAsState(
            targetValue = sliderState.value,
            animationSpec =
                spring(
                    dampingRatio = Spring.DampingRatioNoBouncy,
                    stiffness = Spring.StiffnessVeryLow,
                    visibilityThreshold = 1 / 1000f,
                ),
        )

    Column(horizontalAlignment = Alignment.CenterHorizontally) {
        LoadingIndicator(progress = { animatedProgress })
        Spacer(Modifier.requiredHeight(30.dp))
        Text("Set loading progress:")
        Slider(
            state = sliderState,
            onValueChange = { sliderState.value = it },
            modifier = Modifier.width(300.dp),
        )
    }
}
```
