React AnimeJS โœฆ
Advanced Playgrounds

Interactive example

Draggable (useAnimeDraggable)

Core drag interaction

A live draggable target with position, progress, and velocity telemetry.

Basic Draggable

๐Ÿ‘† Drag
Position: (0, 0)
Progress: (0.00, 0.00)
Velocity: (0.0, 0.0)

Drag configuration

Tune trigger behavior, constraints, resistance, speed, and cursor feedback.

Trigger (Drag Handle)

Only the โ‰ก handle area is draggable

โ‰กDrag here

Card Content

Click here - no drag

Position: (0, 0)

Axis Constraints (x: false / y: false)

โ†” X
โ†• Y
X-only: (0, 0)Y-only: (0, 0)

Container Friction

Rubber-band effect when dragging past bounds

0.95Elastic
0.3Rigid
Elastic: (0, 0)|Rigid: (0, 0)

Drag Speed

How fast element follows cursor

๐Ÿข0.5x
๐Ÿ•1x
๐Ÿ†2x
Slow: (0, 0)|Normal: (0, 0)|Fast: (0, 0)

Drag Threshold

Distance before drag activates (click vs drag)

โšกthreshold=0Immediate
๐Ÿ“threshold=3030px delay
Immediate: Idle|Threshold: Idle

Cursor Configuration

๐Ÿ–ฑ๏ธCustompointerโ†’move
๐ŸšซNo Changecursor=false

Release physics

Compare spring response, velocity, easing, and snap behavior after release.

Spring Physics (stiffness, damping, mass)

๐Ÿ€Bouncy
๐ŸงˆSmooth
๐ŸชจHeavy
Bouncy: stiff=200, damp=8|Smooth: stiff=100, damp=20|Heavy: stiff=40, mass=3

Velocity Settings

๐Ÿš€3x Speed
๐Ÿ›‘Max=200
๐Ÿ“Min=100
3x: v=0|Capped: v=0|Thresh: v=0

Release Easing

โžก๏ธout(3)
๐ŸŽธelastic
๐Ÿ€bounce
Try flicking each element to see the different easing effects!

Snap to Grid (50px)

๐Ÿงฒ
Position: (0, 0)

Control and callbacks

Use imperative controls and inspect drag lifecycle events.

Control Methods

๐ŸŽฎ
Position: (0, 0) | Status: โœ… Enabled

Callbacks

๐Ÿ“ก
Event Log:
Drag to see events...
Position: (0, 0)