> For the complete documentation index, see [llms.txt](https://help.craftsmanplus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.craftsmanplus.com/play/properties/interactions/gestures/swipe.md).

# Swipe

Trigger an action when the user swipes across a layer, in any direction or a specific one.

<figure><img src="https://3019081569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZBycFFNxrdS0X9OsGtmT%2Fuploads%2Fgit-blob-2d4d9aad6330b81ed80d4f82eaef6628425b55b9%2Fgestures-swipe.png?alt=media" alt="The Interaction Properties popup with the Swipe gesture selected"><figcaption></figcaption></figure>

The **Swipe** gestures run an action when the user drags their finger across a layer and lets go. There are five swipe gestures:

* **Swipe Any** fires for a swipe in any direction.
* **Swipe Up**, **Swipe Down**, **Swipe Left** and **Swipe Right** each fire for one direction.

This is useful for patterns like:

* Swipe up to continue or reveal an offer
* Swipe left and right to choose between options
* Swipe to dismiss a card or tutorial
* Catch-all swipe areas built with a full-screen [Hotspot](https://help.craftsmanplus.com/play/layers/hotspots.md)

### How it Works

Each swipe gesture has one **Action** slot.

A swipe starts when the user presses on the layer and is checked when they **lift their finger**. It counts when the finger has moved a short distance from where it started. The finger can leave the layer during the swipe.

* **There is no speed requirement.** A slow drag across the layer counts as a swipe.
* **Each direction is checked on its own axis.** Swipe Up fires when the finger moved far enough upward, regardless of any sideways movement.
* **Ending back where you started cancels the swipe.** Only the distance between the start and the release point counts.
* **A second finger cancels the swipe.**

If the layer sits inside a flipped group, swipe directions flip with it.

{% hint style="info" %}
A diagonal swipe can fire several gestures at once. A swipe up and to the right fires Swipe Any, Swipe Up and Swipe Right if all three are on the layer. Set up only the directions you need.
{% endhint %}

### Where You Can Use It

Swipe gestures are available on every layer type that supports interactions, including Images, Text, Shapes, Videos, Sequences, Groups and [Hotspots](https://help.craftsmanplus.com/play/layers/hotspots.md).

### Setting Up a Swipe

{% stepper %}
{% step %}

### Select a layer and click **+** in the Interactions section.

{% endstep %}

{% step %}

### Set the **Gesture** to **Swipe Any** or one of the four directions.

{% endstep %}

{% step %}

### Choose an **Action.**

{% endstep %}

{% step %}

### Repeat for each direction you want to react to.

{% endstep %}

{% step %}

### Preview and swipe across the layer to test it.

{% endstep %}
{% endstepper %}

{% hint style="warning" %}
A short swipe can also count as a [Single Tap](https://help.craftsmanplus.com/play/properties/interactions/gestures/single-tap.md). If a layer has both gestures, a small swipe may run both actions. Keep tap and swipe interactions on separate layers when they lead to different outcomes.
{% endhint %}

{% hint style="info" %}
Swipes are not compliant triggers for [Launch URL](https://help.craftsmanplus.com/play/general/actions/launch-url.md), [Launch App Store](broken://pages/BceD3nnJOe4CewmqequV) or [Call Number](https://help.craftsmanplus.com/play/general/actions/call-number.md). Use Single Tap for click-outs.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.craftsmanplus.com/play/properties/interactions/gestures/swipe.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
