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


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


<h2 id="draggablestate-ondelta">DraggableState</h2>

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


```kotlin
fun DraggableState(onDelta: (Float) -> Unit): DraggableState
```


Default implementation of `DraggableState` interface that allows to pass a simple action that
will be invoked when the drag occurs.

This is the simplest way to set up a `draggable` modifier. When constructing this
`DraggableState`, you must provide a `onDelta` lambda, which will be invoked whenever drag
happens (by gesture input or a custom `DraggableState.drag` call) with the delta in pixels.

If you are creating `DraggableState` in composition, consider using `rememberDraggableState`.

#### Parameters

| | |
| --- | --- |
| onDelta | callback invoked when drag occurs. The callback receives the delta in pixels. |