<div class='type'>Composable Function</div>


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



<h2 id="collectisdraggedasstate">collectIsDraggedAsState</h2>

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


```kotlin
@Composable
fun InteractionSource.collectIsDraggedAsState(): State<Boolean>
```


Subscribes to this `MutableInteractionSource` and returns a `State` representing whether this
component is dragged or not.

`DragInteraction` is typically set by interactions such as
`androidx.compose.foundation.gestures.draggable` and
`androidx.compose.foundation.gestures.scrollable`, and higher level components such as
`androidx.compose.foundation.lazy.LazyRow`, available through
`androidx.compose.foundation.lazy.LazyListState.interactionSource`.

#### Returns

| | |
| --- | --- |
|  | `State` representing whether this component is being dragged or not |