---
title: "NestedScrollSource"
description: "Possible sources of scroll events in the [NestedScrollConnection]"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
value class NestedScrollSource internal constructor(@Suppress("unused") private val value: Int)
```


Possible sources of scroll events in the `NestedScrollConnection`


## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val UserInput: NestedScrollSource
```


Represents any source of scroll events originated from a user interaction: mouse, touch,
key events.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val SideEffect: NestedScrollSource
```


Represents any other source of scroll events that are not a direct user input. (e.g
animations, fling)



<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** This has been replaced by UserInput.

```kotlin
@Deprecated(
        "This has been replaced by .",
        replaceWith =
            ReplaceWith(
                "NestedScrollSource.",
                "import androidx.compose.ui.input.nestedscroll." +
                    "NestedScrollSource.Companion.",
            ),
    )
    val Drag: NestedScrollSource
```


Dragging via mouse/touch/etc events.



<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** This has been replaced by SideEffect.

```kotlin
@Deprecated(
        "This has been replaced by .",
        replaceWith =
            ReplaceWith(
                "NestedScrollSource.",
                "import androidx.compose.ui.input.nestedscroll." +
                    "NestedScrollSource.Companion.",
            ),
    )
    val Fling: NestedScrollSource
```


Flinging after the drag has ended with velocity.



<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Do not use. Will be removed in the future.

```kotlin
val Relocate: NestedScrollSource
```


Relocating when a component asks parents to scroll to bring it into view.



<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** This has been replaced by UserInput.

```kotlin
@Deprecated(
        "This has been replaced by .",
        replaceWith =
            ReplaceWith(
                "NestedScrollSource.",
                "import androidx.compose.ui.input.nestedscroll." +
                    "NestedScrollSource.Companion.",
            ),
    )
    val Wheel: NestedScrollSource
```


Scrolling via mouse wheel.





