# drag

> Drag from one point to another at a steady speed, with no momentum. For precise scrolling, sliders, pickers and moving icons.

Source: https://zeptap.com/docs/cli/commands/drag



## Usage [#usage]

```sh
zeptap drag <x1> <y1> <x2> <y2> [--ms <ms>] [--hold <ms>] [--end-hold <ms>]
```

## Options [#options]

| Option                | Description                                             |
| --------------------- | ------------------------------------------------------- |
| `<x1> <y1> <x2> <y2>` | Start and end, in whole pixels of the latest screenshot |
| `--ms <ms>`           | How long the move takes (default 800)                   |
| `--hold <ms>`         | Hold still at the start before moving                   |
| `--end-hold <ms>`     | Hold still at the end before lifting                    |

Also takes the [global options](https://zeptap.com/docs/cli#global-options).

## Details [#details]

* The list moves about as far as the finger, with no momentum, so a drag lands where you aim. Use [`flick`](https://zeptap.com/docs/cli/commands/flick) to scroll far.
* Pickers and sliders move about 50 px per step.
* To move a Home Screen icon: `--hold 1200 --ms 1500 --end-hold 1000`, then tap **Done**.

## Examples [#examples]

```sh
$ zeptap drag -l 7 295 900 295 500           # scroll down about 400 px
$ zeptap drag -l 7 120 700 120 640 --ms 400   # move a picker one step
$ zeptap drag -l 7 90 300 300 520 --hold 1200 --ms 1500 --end-hold 1000
```

## MCP tool [#mcp-tool]

[`drag`](https://zeptap.com/docs/agents/tools#drag).
