---
title: "swipeLeft"
description: "Performs a swipe left gesture along the [centerY] of the associated node. The gesture starts
slightly left of the [right] side of the node and ends at the [left] side."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
fun GestureScope.swipeLeft() = delegateScope.touch { swipeLeft() }
```


Performs a swipe left gesture along the `centerY` of the associated node. The gesture starts
slightly left of the `right` side of the node and ends at the `left` side.



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


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
@ExperimentalTestApi
fun GestureScope.swipeLeft(
    startX: Float = rightFuzzed,
    endX: Float = left,
    durationMillis: Long = 200,
) = delegateScope.touch { swipeLeft(startX, endX, durationMillis) }
```


Performs a swipe left gesture along the `centerY` of the associated node, from `startX` till
`endX`, taking `durationMillis` milliseconds.

#### Parameters

| | |
| --- | --- |
| startX | The x-coordinate of the start of the swipe. Must be greater than or equal to the `endX`. By default slightly left of the `right` of the node. |
| endX | The x-coordinate of the end of the swipe. Must be less than or equal to the `startX`. By default the `left` of the node. |
| durationMillis | The duration of the swipe. By default 200 milliseconds. |




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


```kotlin
fun TouchInjectionScope.swipeLeft(
    startX: Float = right,
    endX: Float = left,
    durationMillis: Long = 200,
)
```


Performs a swipe left gesture along `y = `centerY`` of the associated node, from `startX` till
`endX`, taking `durationMillis` milliseconds.

#### Parameters

| | |
| --- | --- |
| startX | The x-coordinate of the start of the swipe. Must be greater than or equal to the `endX`. By default the `right` of the node. |
| endX | The x-coordinate of the end of the swipe. Must be less than or equal to the `startX`. By default the `left` of the node. |
| durationMillis | The duration of the swipe. By default 200 milliseconds. |




