# PositionIndicator

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable [PositionIndicator](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean))( scalingLazyListState: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ScalingLazyListState, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** This overload is provided for backwards compatibility with Compose for Wear OS 1.1.A newer overload is available which uses ScalingLazyListState from androidx.wear.compose.foundation.lazy package |
| `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/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)( lazyListState: https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState` object that a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.lazy.layout.LazyLayoutCacheWindow,kotlin.Function1)` uses. |
| `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/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)( scalingLazyListState: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` object that a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` uses. |
| `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/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)( scrollState: https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState` object. e.g. a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Column.composable#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)` implementing `https://developer.android.com/reference/kotlin/androidx/compose/foundation/verticalScroll.modifier#(androidx.compose.ui.Modifier).verticalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)` provides a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState`. |
| `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/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)( value: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, range: 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>, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, position: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorAlignment, fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` for controls like rotating side button, rotating bezel or slider. |
| `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/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)( state: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState, indicatorHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, indicatorWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, paddingHorizontal: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, position: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorAlignment, fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` An indicator on one side of the screen to show the current `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. |

## Functions

### PositionIndicator

Artifact: [androidx.wear.compose:compose-material](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material/PositionIndicator.kt+function:PositionIndicator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
@Composable
fun [PositionIndicator](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean))(
    scalingLazyListState: ScalingLazyListState,
    modifier: Modifier = Modifier,
    reverseDirection: Boolean = false
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> This overload is provided for backwards compatibility with Compose for Wear OS 1.1.A newer overload is available which uses ScalingLazyListState from androidx.wear.compose.foundation.lazy package

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` object that a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` uses.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| Parameters |
|---|---|
| `scalingLazyListState: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ScalingLazyListState` | the `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` to use as the basis for the PositionIndicatorState. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the component |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |

### PositionIndicator

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

```
@Composable
fun PositionIndicator(
    lazyListState: LazyListState,
    modifier: Modifier = Modifier,
    reverseDirection: Boolean = false,
    fadeInAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    fadeOutAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    positionAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.positionAnimationSpec
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState` object that a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.lazy.layout.LazyLayoutCacheWindow,kotlin.Function1)` uses.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| Parameters |
|---|---|
| `lazyListState: https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState` | the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState` to use as the basis for the PositionIndicatorState. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the component |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |
| `fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-in animation. Fade-in animation is triggered when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` becomes visible - either when state.visibility changes to Show, or state.visibility is AutoHide and state.positionFraction/state.sizeFraction are changed. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |
| `fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-out animation. The Fade-out animation is used for hiding the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and making it invisible. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be hidden after a specified delay if no changes in state.positionFraction or state.sizeFraction were detected. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)`, then after a delay it will be instantly hidden. |
| `positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.positionAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for position animation. The Position animation is used for animating changes between state.positionFraction and state.sizeFraction of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |

### PositionIndicator

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

```
@Composable
fun PositionIndicator(
    scalingLazyListState: ScalingLazyListState,
    modifier: Modifier = Modifier,
    reverseDirection: Boolean = false,
    fadeInAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    fadeOutAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    positionAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.positionAnimationSpec
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` object that a `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` uses.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| Parameters |
|---|---|
| `scalingLazyListState: https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` | the `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListState` to use as the basis for the PositionIndicatorState. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the component |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |
| `fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-in animation. Fade-in animation is triggered when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` becomes visible - either when state.visibility changes to Show, or state.visibility is AutoHide and state.positionFraction/state.sizeFraction are changed. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |
| `fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-out animation. The Fade-out animation is used for hiding the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and making it invisible. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be hidden after a specified delay if no changes in state.positionFraction or state.sizeFraction were detected. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.foundation.lazy.ScalingLazyListState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)`, then after a delay it will be instantly hidden. |
| `positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.positionAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for position animation. The Position animation is used for animating changes between state.positionFraction and state.sizeFraction of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |

### PositionIndicator

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

```
@Composable
fun PositionIndicator(
    scrollState: ScrollState,
    modifier: Modifier = Modifier,
    reverseDirection: Boolean = false,
    fadeInAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    fadeOutAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    positionAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.positionAnimationSpec
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` based on the values in a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState` object. e.g. a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Column.composable#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)` implementing `https://developer.android.com/reference/kotlin/androidx/compose/foundation/verticalScroll.modifier#(androidx.compose.ui.Modifier).verticalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)` provides a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState`.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| Parameters |
|---|---|
| `scrollState: https://developer.android.com/reference/kotlin/androidx/compose/foundation/ScrollState` | The scrollState to use as the basis for the PositionIndicatorState. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the component |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |
| `fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-in animation. Fade-in animation is triggered when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` becomes visible - either when state.visibility changes to Show, or state.visibility is AutoHide and state.positionFraction/state.sizeFraction are changed. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |
| `fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-out animation. The Fade-out animation is used for hiding the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and making it invisible. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be hidden after a specified delay if no changes in state.positionFraction or state.sizeFraction were detected. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.compose.foundation.ScrollState,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)`, then after a delay it will be instantly hidden. |
| `positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.positionAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for position animation. The Position animation is used for animating changes between state.positionFraction and state.sizeFraction of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |

### PositionIndicator

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

```
@Composable
fun PositionIndicator(
    value: () -> Float,
    modifier: Modifier = Modifier,
    range: ClosedFloatingPointRange<Float> = 0f..1f,
    color: Color = MaterialTheme.colors.onBackground,
    reverseDirection: Boolean = false,
    position: PositionIndicatorAlignment = PositionIndicatorAlignment.OppositeRsb,
    fadeInAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    fadeOutAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    positionAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.positionAnimationSpec
): Unit
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` for controls like rotating side button, rotating bezel or slider.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| 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/material/package-summary#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` where 1 represents the maximum value. E.g. If displaying a volume value from 0..11 then the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be volume/11. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the component |
| `range: 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/material/package-summary#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` can take |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.onBackground` | Color to draw the indicator on. |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true |
| `position: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorAlignment = PositionIndicatorAlignment.OppositeRsb` | indicates where to put the PositionIndicator in the screen, default is PositionIndicatorPosition#OppositeRsb |
| `fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-in animation. Fade-in animation is triggered when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` becomes visible - either when state.visibility changes to Show, or state.visibility is AutoHide and state.positionFraction/state.sizeFraction are changed. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |
| `fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-out animation. The Fade-out animation is used for hiding the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and making it invisible. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be hidden after a specified delay if no changes in state.positionFraction or state.sizeFraction were detected. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.ranges.ClosedFloatingPointRange,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)`, then after a delay it will be instantly hidden. |
| `positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.positionAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for position animation. The Position animation is used for animating changes between state.positionFraction and state.sizeFraction of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |

### PositionIndicator

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

```
@Composable
fun PositionIndicator(
    state: PositionIndicatorState,
    indicatorHeight: Dp,
    indicatorWidth: Dp,
    paddingHorizontal: Dp,
    modifier: Modifier = Modifier,
    background: Color = MaterialTheme.colors.onBackground.copy(alpha = 0.3f),
    color: Color = MaterialTheme.colors.onBackground,
    reverseDirection: Boolean = false,
    position: PositionIndicatorAlignment = PositionIndicatorAlignment.End,
    fadeInAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    fadeOutAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.visibilityAnimationSpec,
    positionAnimationSpec: AnimationSpec<Float> = PositionIndicatorDefaults.positionAnimationSpec
): Unit
```

An indicator on one side of the screen to show the current `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`.

Typically used with the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Scaffold.composable#Scaffold(androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0)` but can be used to decorate any full screen situation.

This composable should only be used to fill the whole screen as Wear Material Design language requires the placement of the position indicator to be right center of the screen as the indicator is curved on circular devices.

It detects if the screen is round or square and draws itself as a curve or line.

Note that the composable will take the whole screen, but it will be drawn with the given dimensions `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)`, and position with respect to the edge of the screen according to `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)`

This `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` has 3 separate animation specs to control different animations.

- `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` - controls fade-in animation.

- `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` - controls fade-out animation.

- `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` - controls position change animation.

For performance reasons and for UX consistency, when `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is used with scrollable list, we recommend to switch off fade-in and position animations by passing `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` spec into `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` parameters. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is used as a standalone indicator, for example as volume control, then we recommend to have all 3 animations turned on.

If color of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is not white and position animation is enabled - a short highlight animation will be triggered on any position change. This is a short animation accenting `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` with white color with 33% opacity.

For more information, see the [Scroll indicators](https://developer.android.com/training/wearables/components/scroll) guide.

| Parameters |
|---|---|
| `state: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState` | the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState` of the state we are displaying. |
| `indicatorHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | the height of the position indicator in Dp. |
| `indicatorWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | the width of the position indicator in Dp. |
| `paddingHorizontal: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | the padding to apply between the indicator and the border of the screen. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the component. |
| `background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.onBackground.copy(alpha = 0.3f)` | the color to draw the non-active part of the position indicator. |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.onBackground` | the color to draw the active part of the indicator in. |
| `reverseDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Reverses direction of PositionIndicator if true. |
| `position: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorAlignment = PositionIndicatorAlignment.End` | indicates where to put the PositionIndicator on the screen, default is PositionIndicatorPosition#End |
| `fadeInAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-in animation. Fade-in animation is triggered when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` becomes visible - either when state.visibility changes to Show, or state.visibility is AutoHide and state.positionFraction/state.sizeFraction are changed. To disable this animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` AnimationSpec should be passed instead. |
| `fadeOutAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.visibilityAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for fade-out animation. The Fade-out animation is used for hiding the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` and making it invisible. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicator.composable#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` will be hidden after a specified delay if no changes in state.positionFraction or state.sizeFraction were detected. If `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#PositionIndicator(androidx.wear.compose.material.PositionIndicatorState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Boolean,androidx.wear.compose.material.PositionIndicatorAlignment,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec,androidx.compose.animation.core.AnimationSpec)` is `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)`, then after a delay it will be instantly hidden. |
| `positionAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = PositionIndicatorDefaults.positionAnimationSpec` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec` for position animation. The Position animation is used for animating changes between state.positionFraction and state.sizeFraction of `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PositionIndicatorState`. To disable animation `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#snap(kotlin.Int)` should be passed. |