# LinearProgressIndicator

> LinearProgressIndicator from Material Compose (`androidx.compose.material:material`) for Jetpack Compose, with a code sample.

- Library: [Material Compose](https://composables.com/material-components/material-compose.md)
- Category: [Progress Indicators](https://composables.com/material-components/progress-indicators.md)
- API reference and more examples: [LinearProgressIndicator](https://composables.com/jetpack-compose/androidx.compose.material/material/components/LinearProgressIndicator/api.md)

## Code

```kotlin
@Composable
fun LinearProgressIndicatorSample() {
    var progress by remember { mutableStateOf(0.1f) }
    val animatedProgress by
        animateFloatAsState(
            targetValue = progress,
            animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
        )

    Column(horizontalAlignment = Alignment.CenterHorizontally) {
        LinearProgressIndicator(progress = animatedProgress)
        Spacer(Modifier.requiredHeight(30.dp))
        OutlinedButton(onClick = { if (progress < 1f) progress += 0.1f }) { Text("Increase") }
    }
}
```
