Skip to content
0 / 31 done
Interactions Advanced Exercise 31 of 31

Dragable

Drag elements freely, along an axis or inside a container.

Practice area

Dragabble

1. Simple Example

This is the most basic implementation. The element can be freely dragged anywhere on the page.

Drag me anywhere

Droppable Sizes

2. Axis Restricted

Movement can be constrained to the x-axis (horizontal) or y-axis (vertical).

Horizontal only (x)
Vertical only (y)

Droppable Sizes

3. Container Restricted

This draggable element cannot move outside of its gray parent container.

I'm contained

Droppable Sizes

4. Cursor Position & Style

Control the cursor's appearance and its position relative to the element.

Cursor Style (grabbing)
Cursor at Top-Left
Stick to Center
Cursor at Bottom