For the complete documentation index, see llms.txt. This page is also available as Markdown.

Drag and Drop

Let the user drag a layer onto a target layer, with animations and an action for a successful drop.

The Interaction Properties popup with the Drag and Drop gesture selected

The Drag and Drop gesture lets the user drag a layer onto a target. A drop on the target is a right drop and runs an action. A drop anywhere else is a wrong drop.

This is useful for patterns like:

  • Matching games, like dragging an item to the right bin

  • Assembling an object from parts

  • "Drag the product into the cart" CTAs

For free movement with no target, use Drag instead.

How it Works

Drag and Drop has the following settings, in order:

  • Drop Target selects the layer the user should drop onto. The list shows every layer in the scene except the dragged layer itself and layers hidden in the Layers Panel.

  • Right Drop Behavior controls what happens to the layer after a right drop:

    • Do Nothing (default) leaves it where it was dropped.

    • Move to Center slides it onto the center of the target.

  • Dragging Animation plays while the layer is being dragged:

    • Do Nothing (default)

    • Rotate spins the layer continuously, and restores its angle on release.

  • Right Drop Animation plays after a right drop.

  • Wrong Drop Animation plays after a wrong drop.

  • Snap Back returns the layer to its original position after a wrong drop. Off by default.

  • Action runs after a right drop. It stays disabled until a Drop Target is chosen.

Both drop animations offer the same list as Drag: Blink, Bounce, Bubble, Pulse, Rotate, Slide, Shake or Squish.

Right and Wrong Drops

The drop is checked when the user lets go. It is a right drop when any part of the dragged layer's bounding box overlaps the target's bounding box. Where the finger is does not matter.

  • On a right drop, the Right Drop Behavior runs, then the Right Drop Animation plays and the Action fires. The layer locks in place the moment it is dropped, so it cannot be dragged again, even while it moves to the center, until the scene restarts.

  • On a wrong drop, the Action does not fire. With Snap Back on, the layer returns to where it started, then the Wrong Drop Animation plays. Grabbing it while it returns stops it where it is and skips the animation; the next wrong drop still returns it to where it first started. With Snap Back off, the layer stays where it was dropped and the animation plays right away.

Bounding boxes are rectangles. An image with transparent edges counts as overlapping as soon as its rectangle touches the target, even if the visible pixels do not. Use a Hotspot sized to the real drop zone as the target for tighter control.

Multiple Targets

Add one Drag and Drop interaction per target to accept drops on several layers. Every target the layer overlaps on release counts as a right drop and runs its Action. Only one set of animations plays.

Where You Can Use It

Drag and Drop is available on Images, Text, Shapes, Videos, Sequences and Groups. It is not available on:

Setting Up Drag and Drop

1

Select the layer users will drag, and click + in the Interactions section.

2

Set the Gesture to Drag and Drop.

3

Choose a Drop Target.

4

Set the drop behavior, animations and Snap Back.

5

Choose the Action that runs after a right drop.

6

Preview and drop the layer on and off the target to test both outcomes.

Last updated