# StepperLevelIndicator

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)( value: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, valueRange: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-closed-floating-point-range/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors, strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, sweepAngle: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 360.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` for screens that control a setting, such as volume, with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,kotlin.ranges.IntProgression,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)( value: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, valueProgression: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-progression/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors, strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, sweepAngle: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 360.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,kotlin.ranges.IntProgression,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` for screens that control a setting, such as volume, with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)`. |

## Functions

### StepperLevelIndicator

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/LevelIndicator.kt+function:StepperLevelIndicator) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.6.0)

```
@Composable
fun StepperLevelIndicator(
    value: () -> Float,
    modifier: Modifier = Modifier,
    valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
    enabled: Boolean = true,
    colors: LevelIndicatorColors = LevelIndicatorDefaults.colors(),
    strokeWidth: Dp = LevelIndicatorDefaults.StrokeWidth,
    sweepAngle: @FloatRange(from = 0.0, to = 360.0) Float = LevelIndicatorDefaults.SweepAngle,
    reverseDirection: Boolean = false
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` for screens that control a setting, such as volume, with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)`.

Example of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)`:

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.wear.compose.material3.Stepper
import androidx.wear.compose.material3.StepperDefaults
import androidx.wear.compose.material3.StepperLevelIndicator
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.samples.icons.VolumeDownIcon
import androidx.wear.compose.material3.samples.icons.VolumeUpIcon

var value by remember { mutableFloatStateOf(2f) }
val valueRange = remember { 0f..4f }
Box(modifier = Modifier.fillMaxSize()) {
    Stepper(
        value = value,
        onValueChange = { value = it },
        valueRange = valueRange,
        steps = 7,
        decreaseIcon = { VolumeDownIcon(StepperDefaults.IconSize) },
        increaseIcon = { VolumeUpIcon(StepperDefaults.IconSize) },
    ) {
        Text(String.format("Value: %.1f".format(value)))
    }
    StepperLevelIndicator(
        value = { value },
        valueRange = valueRange,
        modifier = Modifier.align(Alignment.CenterStart),
    )
}
```

![StepperSample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_StepperSample_CompositeImage.png)

| Parameters |
|---|---|
| `value: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Value of the indicator in the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#StepperLevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)`. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the component |
| `valueRange: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-closed-floating-point-range/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = 0f..1f` | range of values that `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#StepperLevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` can take |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Controls the enabled state of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` - when false, disabled colors will be used. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors = LevelIndicatorDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors` that will be used to resolve the indicator and track colors for this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` in different states |
| `strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = LevelIndicatorDefaults.StrokeWidth` | The stroke width for the indicator and track strokes |
| `sweepAngle: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 360.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = LevelIndicatorDefaults.SweepAngle` | The angle covered by the curved LevelIndicator, in degrees |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |

### StepperLevelIndicator

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/LevelIndicator.kt+function:StepperLevelIndicator) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.6.0)

```
@Composable
fun StepperLevelIndicator(
    value: () -> Int,
    valueProgression: IntProgression,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    colors: LevelIndicatorColors = LevelIndicatorDefaults.colors(),
    strokeWidth: Dp = LevelIndicatorDefaults.StrokeWidth,
    sweepAngle: @FloatRange(from = 0.0, to = 360.0) Float = LevelIndicatorDefaults.SweepAngle,
    reverseDirection: Boolean = false
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,kotlin.ranges.IntProgression,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` for screens that control a setting, such as volume, with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)`.

Example of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` with a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Stepper.composable#Stepper(kotlin.Float,kotlin.Function1,kotlin.Int,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,androidx.wear.compose.material3.StepperColors,kotlin.Function1)` working on an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-progression/index.html`:

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.wear.compose.material3.Stepper
import androidx.wear.compose.material3.StepperDefaults
import androidx.wear.compose.material3.StepperLevelIndicator
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.samples.icons.VolumeDownIcon
import androidx.wear.compose.material3.samples.icons.VolumeUpIcon

var value by remember { mutableIntStateOf(3) }
val valueProgression = remember { 0..10 }
Box(modifier = Modifier.fillMaxSize()) {
    Stepper(
        value = value,
        onValueChange = { value = it },
        valueProgression = valueProgression,
        decreaseIcon = { VolumeDownIcon(StepperDefaults.IconSize) },
        increaseIcon = { VolumeUpIcon(StepperDefaults.IconSize) },
    ) {
        Text(String.format("Value: %d".format(value)))
    }
    StepperLevelIndicator(
        value = { value },
        valueProgression = valueProgression,
        modifier = Modifier.align(Alignment.CenterStart),
    )
}
```

![StepperWithIntegerSample Composite
Image](https://developer.android.com/wear/images/design/WearComposeM3_StepperWithIntegerSample_CompositeImage.png)

| Parameters |
|---|---|
| `value: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Current value of the Stepper. If outside of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#StepperLevelIndicator(kotlin.Function0,kotlin.ranges.IntProgression,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` provided, value will be coerced to this range. |
| `valueProgression: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-progression/index.html` | Progression of values that `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/StepperLevelIndicator.composable#StepperLevelIndicator(kotlin.Function0,kotlin.ranges.IntProgression,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` value can take. Consists of rangeStart, rangeEnd and step. Range will be equally divided by step size. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the component |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Controls the enabled state of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` - when false, disabled colors will be used. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors = LevelIndicatorDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicatorColors` that will be used to resolve the indicator and track colors for this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/LevelIndicator.composable#LevelIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.LevelIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Boolean)` in different states |
| `strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = LevelIndicatorDefaults.StrokeWidth` | The stroke width for the indicator and track strokes |
| `sweepAngle: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 360.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = LevelIndicatorDefaults.SweepAngle` | The angle covered by the curved LevelIndicator, in degrees |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |